You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
otel: set http.route span attribute using otel SDK directly (#243)
Replace the removed otelhttp.WithRouteTag with a direct call to
trace.SpanFromContext(r.Context()).SetAttributes(semconv.HTTPRoute(...))
in each generated handler. This restores the http.route span attribute
that was lost when WithRouteTag was removed in otelhttp v0.65.0.
The plugin is needed when otelhttp wraps the mux externally via
otelhttp.NewHandler(mux, ...), since r.Pattern is not available
before the mux dispatches. When using mux.Use(otelhttp.NewMiddleware(...))
instead, the Goa muxer sets r.Pattern early and the plugin is not
necessary.
0 commit comments