fix otel http instrumentation span naming #2
Reference in New Issue
Block a user
No description provided.
Delete Branch "development"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
High-Level Summary:
This pull request refactors the OpenTelemetry instrumentation for HTTP handlers, centralizing span name formatting and route tagging within the
otelhttp.NewHandler
configuration. It introduces a new regular expression to create more descriptive span names by attempting to include the HTTP method and the matched route pattern. The change simplifies individual handler registrations while enhancing the detail and clarity of generated traces. This improves observability by providing more meaningful span names for various request types.Detailed Description:
otelhttp.NewHandler
configuration to include aWithSpanNameFormatter
for more descriptive span naming and ensuresotelhttp.WithRouteTag
is applied for prefixed handlers.