hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
30.95k stars 2.74k forks source link

Hasura auth webhook spankind of SERVER #10241

Open manasag opened 1 month ago

manasag commented 1 month ago

The first call to the webhook, POST/authenticate, has a SpanKind of INTERNAL:

Since it is the first call in a service that appears to be a synchronous request-response flow, the SpanKind should be SERVER. (OTel docs for reference -- SpanKind) https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spankind

Request is, when Hasura emits spans for this particular call, can it have a SpanKind of SERVER please?

obs-gh-rakeshgupta commented 1 month ago

👋 Wanted to add some color to this one -- we have customers using Hasura, they love the fact that Hasura emits OTel span data, and they want to use that data to visualize the full request flow in our service map & trace view including the calls out to Hasura services. Currently the Hasura auth webhook service won't show in the service map since we follow the spec and assume that the first span in a service call is not of kind INTERNAL.