-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(apple): document enableGraphQLOperationTracking option #15669
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle ReportChanges will decrease total bundle size by 169.78kB (-0.49%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
philipphofmann
left a comment
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 a lot for adding this. I added a few comments. LGTM
|
|
||
| When enabled, the SDK extracts the GraphQL operation name from HTTP requests that have `Content-Type: application/json` and contain a JSON body with an `operationName` field. The operation name is then attached to: | ||
|
|
||
| - HTTP breadcrumbs as `graphql_operation_name` (when network breadcrumbs are enabled) |
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.
m: I would mention the exact option here enableNetworkBreadcrumbs and link to the options doc page. I just noticed that we don't have enableNetworkBreadcrumbs on https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/ 😅
I think we should also mention that this is enabled by default otherwise it could be confusing.
| When enabled, the SDK extracts the GraphQL operation name from HTTP requests that have `Content-Type: application/json` and contain a JSON body with an `operationName` field. The operation name is then attached to: | ||
|
|
||
| - HTTP breadcrumbs as `graphql_operation_name` (when network breadcrumbs are enabled) | ||
| - Failed request events in the context as `graphql.operation_name` (when HTTP client error capture is enabled) |
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.
m: We should mention this is enabled by default by the option enableCaptureFailedRequests and link to https://docs.sentry.io/platforms/apple/guides/ios/configuration/http-client-errors/ and/or https://docs.sentry.io/platforms/apple/guides/ios/configuration/options/#enableCaptureFailedRequests
| ### GraphQL Operation Tracking | ||
| When `enableGraphQLOperationTracking` is enabled, the SDK extracts the GraphQL operation name from HTTP requests that have `Content-Type: application/json` and contain a JSON body with an `operationName` field. The operation name is then included in the error event's context as `graphql.operation_name`, making it easier to identify which GraphQL operation failed. |
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.
m: I think we should link here to docs/platforms/apple/common/configuration/graphql-operation-tracking.mdx
| ### GraphQL Operation Tracking | ||
| When `enableGraphQLOperationTracking` is enabled, the SDK extracts the GraphQL operation name from HTTP requests that have `Content-Type: application/json` and contain a JSON body with an `operationName` field. The operation name is then included in the error event's context as `graphql.operation_name`, making it easier to identify which GraphQL operation failed. |
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.
l: I think we could be a bit clearer that enableGraphQLOperationTracking is disabled by default.
DESCRIBE YOUR PR
This PR adds comprehensive documentation for the
enableGraphQLOperationTrackingoption in the Sentry Cocoa/Apple SDK.Changes:
graphql-operation-tracking.mdxwith detailed information about how GraphQL operation tracking worksoptions.mdxto include theenableGraphQLOperationTrackingoption with a reference to the dedicated pagehttp-client-errors.mdxto include information about GraphQL operation tracking in failed request eventsThe documentation explains that when enabled, the SDK extracts GraphQL operation names from HTTP requests (with
Content-Type: application/jsonand anoperationNamefield) and attaches them to:graphql_operation_name(when network breadcrumbs are enabled)graphql.operation_name(when HTTP client error capture is enabled)This feature is disabled by default (
false).Closes #15606
IS YOUR CHANGE URGENT?
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: