opentelemetry-erlang-contrib
opentelemetry-erlang-contrib copied to clipboard
Allow additional options for filtering/labeling HTTP instrumentation spans
Some other languages' OpenTelemetry HTTP instrumentation libraries provide convenient options for filtering and modifying the spans created by the instrumentation libraries. It would be great to provide these options in Erlang/Elixir. See this discussion in slack.
Describe the solution you'd like The interface could mirror either the go or node.js implementations:
- https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp#Filter
- https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http#http-instrumentation-options
Specifically, from the go instrumentation, the concept of Labelers and Filters, and from the Node.js instrumentation the headersToSpanAttributes
configuration object.