apollographql / router

A configurable, high-performance routing runtime for Apollo Federation 🚀
https://www.apollographql.com/docs/router/
Other
807 stars 272 forks source link

Router-Datadog spans tagging #3702

Closed JulianRojasBet closed 3 months ago

JulianRojasBet commented 1 year ago

Is your feature request related to a problem? Please describe. There is not currently possible to tag Router spans when using Datadog for tracing.

Describe the solution you'd like It would be great to have the ability to add tags to Apollo Router spans (either one or all of them) from values on the request headers or generally for any source. So that way, it is possible to enhance our Datadog observability and metrics by filtering/grouping spans using those tags. e.g knowing which user-agents hits our API the most.

Describe alternatives you've considered Haven't found any customization or way to do it by using rhai scripts

Geal commented 1 year ago

hi, thanks for the report. We are aware of this need, and looking into it. You can follow the development in https://github.com/apollographql/router/issues/3226

BrynCooke commented 10 months ago

This is available in the version 1.35

https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/spans#attributes

Spans can now be completely customized via yaml.

BrynCooke commented 10 months ago

Reopening as we do however still need to make sure that datadog is able to interpret the span tags.

BrynCooke commented 3 months ago

This has been implemented as part of advanced telemetry selectors. https://www.apollographql.com/docs/router/configuration/telemetry/instrumentation/selectors/ Datadog works well.