Trouble Configuring OpenTelemetry / Sentry in GraphQL with Effect
Hey everyone!
I'm having kind of a hard time figuring out how to properly trace requests using OpenTelemetry / Sentry.
I have my usual NodeSDK Layer (found an example in this channel) which I provide to my AppLive layer like so;
Tracing works fine in my regular Effect services, but I can't seem to figure out how to make a GraphQL Yoga resolver the parent of the nested spans in a resolver.
I've tried creating my own plugin for GraphQL Yoga to create a span for each query / mutation / subscription hoping that the children spans would nest, but it doesn't seem to work.
I provide the plugin to Yoga like this (along with a resolver layer):
Nothing seems to be connected. I'm a beginner at Effect, so any tips would be appreciated.
If I create the span directly in the resolver it works, but I'd like to create the span in the plugin so I don't have to repeat the same code in every resolver.
These are the logs. Hello is the graphql query span, the rest is services running inside the resolver.
I'm having kind of a hard time figuring out how to properly trace requests using OpenTelemetry / Sentry.
I have my usual NodeSDK Layer (found an example in this channel) which I provide to my AppLive layer like so;
Tracing works fine in my regular Effect services, but I can't seem to figure out how to make a GraphQL Yoga resolver the parent of the nested spans in a resolver.
I've tried creating my own plugin for GraphQL Yoga to create a span for each query / mutation / subscription hoping that the children spans would nest, but it doesn't seem to work.
I provide the plugin to Yoga like this (along with a resolver layer):
Nothing seems to be connected. I'm a beginner at Effect, so any tips would be appreciated.
If I create the span directly in the resolver it works, but I'd like to create the span in the plugin so I don't have to repeat the same code in every resolver.
These are the logs. Hello is the graphql query span, the rest is services running inside the resolver.
