Skip to content

Commit 913e583

Browse files
committed
add spec that allows otel_span:end_span/2 to return undefined
1 parent 0a969d1 commit 913e583

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/opentelemetry_api/src/otel_span.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ update_name(_, _) ->
289289
%% If `SpanCtx' is not recording, this function doesn't do anything.
290290
%% Returns the updated span context.
291291
-spec end_span(SpanCtx) -> SpanCtx when
292-
SpanCtx :: opentelemetry:span_ctx().
292+
SpanCtx :: opentelemetry:span_ctx() | undefined.
293293
end_span(SpanCtx=#span_ctx{span_sdk={Module, _}}) when ?is_recording(SpanCtx) ->
294294
_ = Module:end_span(SpanCtx, undefined),
295295
SpanCtx#span_ctx{is_recording=false};

0 commit comments

Comments
 (0)