Skip to content

Commit

Permalink
Make the end timestamp and mutable span as requirements in onending (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu authored Oct 8, 2024
1 parent 3a0d7af commit 4492a33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,10 @@ are invoked in the order they have been registered.

**Status**: [Development](../document-status.md)

`OnEnding` is called during the span `End()` operation, after the end timestamp has been set. The Span object is still mutable (i.e., `SetAttribute`, `AddLink`, `AddEvent` can be called) while `OnEnding` is called.
`OnEnding` is called during the span `End()` operation.
The end timestamp MUST have been computed (the `OnEnding` method duration is not included
in the span duration).
The Span object MUST still be mutable (i.e., `SetAttribute`, `AddLink`, `AddEvent` can be called) while `OnEnding` is called.
This method MUST be called synchronously within the [`Span.End()` API](api.md#end),
therefore it should not block or throw an exception.
If multiple `SpanProcessors` are registered, their `OnEnding` callbacks
Expand Down

0 comments on commit 4492a33

Please sign in to comment.