Skip to content

Commit 97711fe

Browse files
authored
fix(apple): Enhance GraphQL operation tracking documentation (#15716)
1 parent 312794d commit 97711fe

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

docs/platforms/apple/common/configuration/graphql-operation-tracking.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ description: "Enable tracking of GraphQL operation names in HTTP breadcrumbs and
66

77
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:
88

9-
- HTTP breadcrumbs as `graphql_operation_name` (when network breadcrumbs are enabled)
10-
- Failed request events in the context as `graphql.operation_name` (when HTTP client error capture is enabled)
9+
- HTTP breadcrumbs as `graphql_operation_name` (when network breadcrumbs are enabled via the <PlatformLink to="/configuration/options/#enableNetworkBreadcrumbs">`enableNetworkBreadcrumbs`</PlatformLink> option, which is enabled by default)
10+
- Failed request events in the context as `graphql.operation_name` (when HTTP client error capture is enabled via the <PlatformLink to="/configuration/options/#enableCaptureFailedRequests">`enableCaptureFailedRequests`</PlatformLink> option, which is enabled by default since version 8.0.0). Learn more in the <PlatformLink to="/configuration/http-client-errors/">HTTP Client Errors</PlatformLink> documentation.
1111

1212
This feature is disabled by default. To enable it:
1313

docs/platforms/apple/common/configuration/http-client-errors.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ SentrySDK.start { options in
7575
7676
### GraphQL Operation Tracking
7777
78-
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.
78+
When the <PlatformLink to="/configuration/options/#enableGraphQLOperationTracking">`enableGraphQLOperationTracking`</PlatformLink> option is enabled (disabled by default), 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. Learn more in the <PlatformLink to="/configuration/graphql-operation-tracking/">GraphQL Operation Tracking</PlatformLink> documentation.
7979
8080
```swift {tabTitle:Swift}
8181
import Sentry

docs/platforms/apple/common/configuration/options.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ Set this boolean to `false` to disable sending of client reports. Client reports
204204

205205
</SdkOption>
206206

207+
<SdkOption name="enableNetworkBreadcrumbs" type="bool" defaultValue="true">
208+
209+
When enabled, the SDK adds breadcrumbs for each network request. This feature uses swizzling, so disabling <PlatformLink to="/configuration/swizzling/">`enableSwizzling`</PlatformLink> also disables this feature.
210+
211+
If you want to enable or disable network tracking for performance monitoring, use <PlatformLink to="/configuration/options/#enableNetworkTracking">`enableNetworkTracking`</PlatformLink> instead.
212+
</SdkOption>
213+
207214
<SdkOption name="enableCaptureFailedRequests" type="bool">
208215

209216
Once enabled, this feature automatically captures HTTP client errors, like bad response codes, as error events and reports them to Sentry.

0 commit comments

Comments
 (0)