Description
Problem Statement
The semconvutil
package follows semantic conventions for span attributes set during a round-trip of a client-request.
Exposing the utility functions from semconvutil
would allow other RoundTripper
s to use them, leading to consistent, semconv-aligned telemetry.
In my specific use case, I'm providing a logging transport and would like to use the same attribute keys as the otelhttp
transport does.
Proposed Solution
Move semconvutil
from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil
to go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/semconvutil
Alternatives
- Copy-pasting the internals of
semconvutil
to internal instrumentation library. Which isn't really maintainable - Or keep the current implementation, which doesn't align with the semantic conventions
- Accessing the attributes of the parent span from the
otelhttp
transport (if that's even possible)
Prior Art
Not aware of any.
Additional Context
We have some tools which run a low frequency of client requests and would like to correlate log messages in our system with the corresponding spans we export.
Activity