Open
Description
There are circumstances for instrumented actions where:
- The action is frequent and of low interest: a healthcheck, polling a message queue, etc.
- An OpenTracing exporter uses libraries that themselves may be instrumented (risking infinite tracing).
- If the current layer (e.g. RPC) happens to offer sufficiently detailed tracing, lower HTTP/DNS/TCP/UDP layers do not need to be traced when invoked with this library. This need is heighten by the use of server/client spans, which AFAIK needs to remove spans in between them. (SpanKind with layers #526).
(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-request
headers, 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Spec - Priority Backlog