Skip to content

Commit

Permalink
add spec that allows otel_span:end_span/2 to return undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
RudolfMan committed Nov 22, 2024
1 parent 0a38bd4 commit 080fbc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/opentelemetry_api/src/otel_span.erl
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ update_name(_, _) ->
%% If `SpanCtx' is not recording, this function doesn't do anything.
%% Returns the updated span context.
-spec end_span(SpanCtx) -> SpanCtx when
SpanCtx :: opentelemetry:span_ctx().
SpanCtx :: opentelemetry:span_ctx() | undefined.
end_span(SpanCtx=#span_ctx{span_sdk={Module, _}}) when ?is_recording(SpanCtx) ->
_ = Module:end_span(SpanCtx, undefined),
SpanCtx#span_ctx{is_recording=false};
Expand Down

0 comments on commit 080fbc1

Please sign in to comment.