File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
docs/platforms/javascript/common/configuration/integrations Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : GraphQL Client
3+ description : " Track healthy Sessions in the Browser."
4+ notSupported :
5+ - javascript.cordova
6+ - javascript.node
7+ - javascript.aws-lambda
8+ - javascript.azure-functions
9+ - javascript.connect
10+ - javascript.express
11+ - javascript.fastify
12+ - javascript.gcp-functions
13+ - javascript.hapi
14+ - javascript.hono
15+ - javascript.koa
16+ - javascript.nestjs
17+ - javascript.deno
18+ - javascript.cloudflare
19+ - javascript.bun
20+ ---
21+
22+ <Alert >
23+
24+ This integration only works inside a browser environment.
25+
26+ </Alert >
27+
28+ _ Import name: ` Sentry.graphqlClientIntegration ` _
29+
30+ This integration enhances the data captured from GraphQL requests in your application.
31+ It extracts GraphQL-specific information from HTTP requests matching your configured endpoints and enriches
32+ both spans and breadcrumbs with GraphQL operation details.
33+
34+ When enabled, this integration will:
35+ - Update span names with the GraphQL operation type and name
36+ - Add GraphQL query documents to spans
37+ - Add GraphQL operation information to breadcrumbs
38+
39+ ## Options
40+
41+ ### ` endpoints `
42+
43+ _ Type: ` (string|RegExp)[] ` _
44+
45+ An array of URLs or URL patterns that should be treated as GraphQL endpoints.
46+ The integration will only process requests to these endpoints. This array can contain strings, regular expressions, or a combination of both.
47+
48+ Example:
49+ ``` javascript
50+ Sentry .init ({
51+ integrations: [
52+ Sentry .graphqlClientIntegration ({
53+ endpoints: [
54+ ' https://api.example.com/graphql' ,
55+ / \/ graphql$ /
56+ ]
57+ })
58+ ]
59+ });
60+ ```
61+
62+ To ** match all** endpoints with the ` graphqlClientIntegration ` , you would set the endpoints option to ` [/.*/] ` in your configuration.
63+ This regex pattern will match any URL.
64+
You can’t perform that action at this time.
0 commit comments