Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feat: Add
graphql-java
instrumentation. #1777Feat: Add
graphql-java
instrumentation. #1777Changes from 12 commits
c1f11cb
5e454a7
f0f9027
3d27109
e861e57
a43603b
67265a2
4ef521d
ef4b780
60474bc
9245a43
f16a681
a66aeed
e37ddd9
de5d9bd
542c6b6
8180ec2
8ec6a1f
96c8e30
cabfa4a
b0fc86d
6c77fca
9c55ee8
f42ef1f
10258a2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to use the
SentryInstrumentation
in our spring-graphql application (using Spring Boot), but the transaction here is alwaysnull
. Is it necessary to manually start a transaction? Or how can I get this to work?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the Docs PR getsentry/sentry-docs#4385
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I didn't see that PR yet. But unfortunately it doesn't solve the issue; performance tracing is set up, but apparently a transaction isn't started before graphql execution.
For now I think I've mitigated it by adding a
WebInterceptor
(a spring-graphql concept), that starts a transaction;According to the PR description "the transaction name is
POST /graphql
", but this doesn't seem to be defined explicitly, so could it be that the assumption is made that the the http/network layer already starts the transaction, but that somehow with spring-graphql this doesn't happen?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the graphql integration only creates spans if there's an active transaction, so ideally you'd use it along with an integration that has the ability to create a transaction, eg https://docs.sentry.io/platforms/java/guides/spring-boot/performance/instrumentation/automatic-instrumentation/
or just create a transaction yourself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just found that out too, but unfortunately there's no auto instrumentation available for applications using webflux, so I guess I have to implement what's in
SentryTracingFilter
, but then reactive.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, #1807
no priorities for now, but if you feel adding support via PR, happy to guide :)