strawberry-graphql / strawberry

A GraphQL library for Python that leverages type annotations 🍓
https://strawberry.rocks
MIT License
3.99k stars 531 forks source link

Support for federated tracing #1978

Open paulpdaniels opened 2 years ago

paulpdaniels commented 2 years ago

Not sure if this is an implementation issue or a documentation issue (I couldn't find any thing of the latter and I'm not fluent enough in python to find the former yet), but it seems like federated tracing is missing as part of the federated support. I checked the subgraph compatibility and it is missing from there as well (annotated as FTV1).

Note that it is different from the traditional apollo tracing: https://www.apollographql.com/docs/federation/metrics/#how-tracing-data-is-exposed-from-a-subgraph

Upvote & Fund

Fund with Polar

patrick91 commented 2 years ago

hi @paulpdaniels, this is not yet supported, but I wanted to add support for it 😊

This the JS implementation: https://github.com/apollographql/apollo-server/blob/main/packages/apollo-server-core/src/plugin/inlineTrace/index.ts

and this is a demo I did a while ago: https://github.com/patrick91/django-ddd-caching/blob/main/api/extensions.py I'm not sure it uses the right protocol, but it is definitely a start