Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTracing Shim: Add Tracer.Close() operation. #3048

Merged
merged 15 commits into from
Jan 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions specification/compatibility/opentracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [Start a new Span](#start-a-new-span)
* [Inject](#inject)
* [Extract](#extract)
* [Close](#close)
* [Span Shim and SpanContext Shim relationship](#span-shim-and-spancontext-shim-relationship)
* [Span Shim](#span-shim)
* [Get Context](#get-context)
Expand Down Expand Up @@ -157,6 +158,9 @@ OpenTracing and OpenTelemetry units.

The API MUST return an OpenTracing `Span`.

For OpenTracing languages implementing [Close](#close), this operation MUST
return an OpenTracing no-op `Span` if the `Tracer` Shim has been closed.

### Inject

Parameters:
Expand Down Expand Up @@ -205,6 +209,18 @@ Errors MAY be raised if either the `Format` is not recognized
or no value could be extracted, depending on the specific OpenTracing Language API
(e.g. Go and Python do, but Java may not).

## Close

Mark the `Tracer` Shim as closed, effectively preventing creation of new `Span` instances.
Subsequent calls to [Start a new Span](#start-a-new-span) MUST return a no-op instance.
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved

Closing an already closed instance MUST NOT raise an error.

Observe that not all OpenTracing languages implement this operation.

Note: the underlying OpenTelemetry `Tracer` is not actually closed, as the OpenTelemetry API
currently does not expose such functionality.

## Span Shim and SpanContext Shim relationship

As per the OpenTracing Specification, the OpenTracing `SpanContext` Shim
Expand Down