Skip to content

Commit

Permalink
Handle empty stack in pop_from_tracer_stack (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
rindek authored Sep 23, 2024
1 parent 7031bcc commit afa2354
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utilities/opentelemetry_telemetry/src/otel_telemetry.erl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ pop_from_tracer_stack(TracerId) ->
undefined;
[SpanCtxSet | Rest] ->
erlang:put({otel_telemetry, TracerId}, Rest),
SpanCtxSet
SpanCtxSet;
[] ->
?LOG_DEBUG("`opentelemetry_telemetry` span ctx tracer stack for "
"TracerId ~p in Pid ~p is empty.", [TracerId, self()]),
undefined
end.

handle_event(_Event,
Expand Down

0 comments on commit afa2354

Please sign in to comment.