-
Notifications
You must be signed in to change notification settings - Fork 976
Use Context to stop tracing #530
Copy link
Copy link
Open
Labels
area:apiCross language API specification issueCross language API specification issuemaintainer-requestEscalated by SIG maintainersEscalated by SIG maintainersspec:contextRelated to the specification/context directoryRelated to the specification/context directoryspec:traceRelated to the specification/trace directoryRelated to the specification/trace directorytriage:accepted:needs-sponsorReady to be implemented, but does not yet have a specification sponsorReady to be implemented, but does not yet have a specification sponsor
Metadata
Metadata
Assignees
Labels
area:apiCross language API specification issueCross language API specification issuemaintainer-requestEscalated by SIG maintainersEscalated by SIG maintainersspec:contextRelated to the specification/context directoryRelated to the specification/context directoryspec:traceRelated to the specification/trace directoryRelated to the specification/trace directorytriage:accepted:needs-sponsorReady to be implemented, but does not yet have a specification sponsorReady to be implemented, but does not yet have a specification sponsor
Type
Projects
Status
Spec - Priority Backlog
There are circumstances for instrumented actions where:
(1) has come up in #173
(2) has been a problem in opentelemetry-js (open-telemetry/opentelemetry-js#332) HTTP-based exporters, since the Node.js stdlib is instrumented globally. The solution in that has was adding a special HTTP header
x-opentelemetry-outgoing-requestheaders, that the http instrumentation ignores. In essence it uses HTTP headers as a poor-man's context API. (This may not scale to other APIs.)It would be nice to cut off all automatic tracing "below this current scope" by setting a context key. The default tracer implementation would create no-op spans if the context disables spans.
EDIT: Case (1) may call for sampling, rather than full disabling.