You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/docs/hotchocolate/v14/server/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Though not considered one of the responsibilities of a GraphQL server, for conve
50
50
51
51
# Instrumentation
52
52
53
-
Hot Chocolate allows you to gather instrumentation data about your GraphQL server, by hooking into various events in the execution process of a GraphQL request. You will also learn how to setup our OpenTelemetry integration and how to utilize _Apollo Tracing_.
53
+
Hot Chocolate allows you to gather instrumentation data about your GraphQL server, by hooking into various events in the execution process of a GraphQL request. You will also learn how to set up our OpenTelemetry integration.
54
54
55
55
[Learn more about instrumentation](/docs/hotchocolate/v14/server/instrumentation)
_Apollo Tracing_ is a [performance tracing specification](https://github.com/apollographql/apollo-tracing) for GraphQL servers. It works by returning tracing information about the current request alongside the computed data. While it is not part of the GraphQL specification itself, there is a common agreement in the GraphQL community that all GraphQL servers should support it.
381
-
382
-
**Example**
383
-
384
-
```graphql
385
-
{
386
-
book(id: 1) {
387
-
name
388
-
author
389
-
}
390
-
}
391
-
```
392
-
393
-
The above request would result in the below response if _Apollo Tracing_ is enabled.
|`Never`|_Apollo Tracing_ is disabled. Useful if we want to conditionally disable _Apollo Tracing_. |
459
-
|`OnDemand`|_Apollo Tracing_ only traces requests if a specific header is passed with the query request. |
460
-
|`Always`|_Apollo Tracing_ is always enabled, and all query requests are traced automatically. |
461
-
462
-
## On Demand
463
-
464
-
When _Apollo Tracing_ is added using the `TracingPreference.OnDemand`, we are required to pass one of the following HTTP headers with our query request in order to enable tracing for this specific request.
465
-
466
-
-`GraphQL-Tracing=1`
467
-
-`X-Apollo-Tracing=1`
468
-
469
-
When using `curl` this could look like the following.
470
-
471
-
```bash
472
-
curl -X POST -H 'GraphQL-Tracing: 1' -H 'Content-Type: application/json' \
0 commit comments