krakend / krakend-otel

KrakenD component for OpenTelemetry
Apache License 2.0
8 stars 10 forks source link

All spans have the same kind #5

Closed adigiorgi-clickup closed 5 months ago

adigiorgi-clickup commented 5 months ago

All spans produced by the KrakenD OTEL integration have the same default INTERNAL SpanKind. In Datadog, the span kind is used to generate the "operation name" of the spans. With all the spans having the same kind, it means they also have all the same name:

Screenshot 2024-03-15 at 4 42 04 PM

This is an issue when Datadog selects the primary operation of a service, because it's not possible to distinguish between the entry-point span of a KrakenD HTTP request, and all the other spans.

Screenshot 2024-03-14 at 10 09 55 PM

To be semantically accurate with the OTEL specifications, the entry-point span of a KrakenD trace should have kind equal to SERVER, and the spans corresponding to requests to backend services should have kind equal to CLIENT.

thinkingabouther commented 5 months ago

Hey, noticed the issue being closed, but the change is yet to be released; would appreciate it being included in a minor version bump, if possible, as the OTEL Collector service graph relies on proper span.kind values as well. Thank you for your efforts!