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
In this implementation, a span is given the name of HTTP ${METHOD}, whereas when looking at spans from other sources, such as Dotnet, name has the format of ${METHOD} ${PATH} making it possible to distinguish requests from each other in an overview of traces.
In the image: Yellow traces are sourced from a Dotnet backend. Cyan traces comes from FetchInstrumentation:
Suggested solution
A simple solution with breaking change: Decorate Span name with Request-URL:s path.
A generic solution with no breaking change: Add an optional property to the FetchInstrumentationConfig which is a function working similarly to the applyCustomAttributesOnSpan property, but accepts the name as an argument and returns a new name.
You're correct that the span name shouldn't be prefixed with HTTP, but for client spans the behaviour of not including the target is correct, since that could result in a pretty high cardinality of span names. .
opentelemetry-js/experimental/packages/opentelemetry-instrumentation-fetch/src/fetch.ts
Line 221 in 492ed35
Problem
In this implementation, a span is given the name of
HTTP ${METHOD}
, whereas when looking at spans from other sources, such as Dotnet, name has the format of${METHOD} ${PATH}
making it possible to distinguish requests from each other in an overview of traces.In the image: Yellow traces are sourced from a Dotnet backend. Cyan traces comes from FetchInstrumentation:
Suggested solution
A simple solution with breaking change: Decorate Span name with Request-URL:s path.
A generic solution with no breaking change: Add an optional property to the
FetchInstrumentationConfig
which is a function working similarly to theapplyCustomAttributesOnSpan
property, but accepts the name as an argument and returns a new name.The text was updated successfully, but these errors were encountered: