-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
GraphQL Integration in AWS Lambda doesn't instrument resolvers #16092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is pretty weird. Nothing about this should be AWS specific 🤔 Looking at the linked event, this seems off anyhow because it also does not include the GraphQL query name, which was added in the recent version. I see other traces in your account that do have this, though. Are the versions aligned/correct there? Can you make sure that everything is up-to-date there? Could you share the debug logs of such a request, too? Would be interesting to see what spans are being created etc there. |
Hi, thanks for your reply. The traces you mentioned in our events do not come from Sentry's native integration but were manually instrumented using a custom Apollo plugin we developed internally. We did this because the native Sentry integration is not working as expected. I also mentioned this issue in a comment on another related issue (#15699): my comment here. In that comment, I explained that I attempted to use Sentry's native integration, but it didn't work correctly. Here are some debug logs for Sentry version 9.13.0, which includes the fix for GraphQL instrumentation. However, it is still not working for me. I have enabled the native Sentry integration for GraphQL in these logs:
Looking forward to any suggestions or additional steps I can take to resolve this issue. |
So, is the |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
9.13.0
Framework Version
AWS Lambda with Apollo Server GraphQL
Link to Sentry event
https://bilderit.sentry.io/traces/trace/b5502b4f9cda4cdfb8e0286b5873f33f/?environment=pr1698&mode=samples&node=span-c9ad754030442f47&node=txn-5a2233ef49234b2cb542307b65cabffa&pageEnd&pageStart&project=5261508&source=traces&statsPeriod=1h&table=trace×tamp=1744911566.867
Reproduction Example/SDK Setup
Steps to Reproduce
Expected Result
Actual Result
graphql.parse
spans are created, no resolver spans appearAdditional Information
I've noticed that while the GraphQL integration is installed and appears to be patching the GraphQL module, it's not properly instrumenting resolver functions in the AWS Lambda environment. This seems to be related to issue #15699, but specifically focuses on the resolver instrumentation not working at all.
The logs show that the GraphQL parser is being instrumented, but no spans are created for resolvers despite setting
ignoreResolveSpans: false
.The text was updated successfully, but these errors were encountered: