opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Spans created by HTTP instrumentation package does not conform to guidelines for span names

Open YuriiBarninets opened this issue 3 years ago • 3 comments

According to the OpenTelemetry specification HTTP spans MUST follow the overall guidelines for span names.

For example, the current implementation of HTTP instrumentation package creates Spans with the name GET or POST, even though the specification says that HTTP {METHOD_NAME} should be used as Span name.

HTTP client spans SHOULD be using conservative, low cardinality names formed from the available parameters of an HTTP request, such as "HTTP {METHOD_NAME}"

YuriiBarninets avatar Mar 31 '21 12:03 YuriiBarninets

Hey can I try to do this one?

humivo avatar Apr 20 '21 15:04 humivo

For server spans, it would be nice to include the route as well, as described in the spec.

(Inspired by https://github.com/kubernetes/kubernetes/issues/112059)

dashpole avatar Aug 29 '22 12:08 dashpole

cc @fatsheep9146

It would be nice if the default behavior of otelhttp matched what you are doing in k8s so we don't need to implement our own naming function there.

dashpole avatar Mar 13 '24 14:03 dashpole