diff --git a/docs/platforms/javascript/common/configuration/integrations/graphql.mdx b/docs/platforms/javascript/common/configuration/integrations/graphql.mdx index 38183a260664b7..8c2c3d31e08f9b 100644 --- a/docs/platforms/javascript/common/configuration/integrations/graphql.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/graphql.mdx @@ -59,3 +59,15 @@ _Type: `boolean`_ If spans for the execution of the default resolver on object properties should not be created. Default is `true`. When a resolver function is not defined on the schema for a field, GraphQL will use the default resolver which just looks for a property with that name on the object. If the property is not a function, it's not very interesting to trace. This option can reduce noise and number of spans created. + +### `useOperationNameForRootSpan` + +_Type: `boolean`_ + +By default, this option is `true`. + +With this setting enabled, the GraphQL instrumentation dynamically updates the name of the `http.server` root span by appending +the operation names. Instead of generic span names like `POST /graphql`, span names will be more descriptive, such as `POST /graphql (query MyQuery)`. +For requests containing multiple operations, the span names will aggregate operation names, for example `POST /graphql (query Query1, query Query2)` + +Set the option to `false` to preserve the default `http.server` span name without this additional context.