Skip to content

Commit

Permalink
Update Tracing API: IsRecording wording
Browse files Browse the repository at this point in the history
  • Loading branch information
utezduyar committed Dec 13, 2022
1 parent 5b6d225 commit bcfc27e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,16 @@ The Span interface MUST provide:

#### IsRecording

Returns true if this `Span` is recording information like events with the
`AddEvent` operation, attributes using `SetAttributes`, status with `SetStatus`,
etc.

Returns `true` if this `Span` has been started but not ended.
After a `Span` is ended, it usually becomes non-recording and thus
`IsRecording` SHOULD consequently return false for ended Spans.
`IsRecording` SHOULD consequently return `false` for ended Spans.
Note: Streaming implementations, where it is not known if a span is ended,
are one expected case where `IsRecording` cannot change after ending a Span.

Recording information like events with the `AddEvent` operation, attributes
using `SetAttributes`, status with `SetStatus`, etc will not perform if
`IsRecording` returns `false`.

`IsRecording` SHOULD NOT take any parameters.

This flag SHOULD be used to avoid expensive computations of a Span attributes or
Expand Down

0 comments on commit bcfc27e

Please sign in to comment.