diff --git a/docs/source/configuration/telemetry/instrumentation/selectors.mdx b/docs/source/configuration/telemetry/instrumentation/selectors.mdx index 59eaca160a..0234bb886d 100644 --- a/docs/source/configuration/telemetry/instrumentation/selectors.mdx +++ b/docs/source/configuration/telemetry/instrumentation/selectors.mdx @@ -5,7 +5,7 @@ description: Extract and select data from the Apollo GraphOS Router's pipeline s --- import RouterServices from '../../../../shared/router-lifecycle-services.mdx'; -A _selector_ is used to extract data from the GraphOS Router's request lifecycle (pipeline) services and attach them to telemetry, specifically [spans](./spans), [instruments](./instruments), [conditions](./conditions) and [events](./events). +A _selector_ is used to extract data from the GraphOS Router's request lifecycle (pipeline) services and attach them to telemetry. Specifically [spans](./spans), [instruments](./instruments), [conditions](./conditions) and [events](./events). An example of a selector, `request_header`, of the router service on a custom span attribute: @@ -40,7 +40,7 @@ The router service is the initial entrypoint for all requests. It is HTTP centri | `response_context` | Yes | | The name of a response context key | | `baggage` | Yes | | The name of a baggage item | | `env` | Yes | | The name of an environment variable | -| `on_graphql_error` | No | `true`\|`false` | Boolean set to true if the response payload contains a graphql error | +| `on_graphql_error` | No | `true`\|`false` | Boolean set to true if the response payload contains a GraphQL error | | `static` | No | | A static string value | | `error` | No | `reason` | a string value containing error reason when it's a critical error | @@ -52,20 +52,20 @@ The supergraph service is executed after query parsing but before query executio |--------------------|-------------|-------------------------------------------------------|-----------------------------------------------------------------------------------| | `operation_name` | Yes | `string`\|`hash` | The operation name from the query | | `operation_kind` | No | `string` | The operation kind from the query | -| `query` | Yes | `string`\|`aliases`\|`depth`\|`height`\|`root_fields` | The graphql query | -| `query_variable` | Yes | | The name of a graphql query variable | +| `query` | Yes | `string`\|`aliases`\|`depth`\|`height`\|`root_fields` | The GraphQL query | +| `query_variable` | Yes | | The name of a GraphQL query variable | | `request_header` | Yes | | The name of a request header | | `response_header` | Yes | | The name of a response header | | `is_primary_response` | No | `true`\|`false` | Boolean returning true if it's the primary response and not events like subscription events or deferred responses | -| `response_data` | Yes | | Json Path into the supergraph response body data (it might impact performances) | -| `response_errors` | Yes | | Json Path into the supergraph response body errors (it might impact performances) | +| `response_data` | Yes | | JSON Path into the supergraph response body data (it might impact performance) | +| `response_errors` | Yes | | JSON Path into the supergraph response body errors (it might impact performance) | | `request_context` | Yes | | The name of a request context key | | `response_context` | Yes | | The name of a response context key | -| `on_graphql_error` | No | `true`\|`false` | Boolean set to true if the response payload contains a graphql error | +| `on_graphql_error` | No | `true`\|`false` | Boolean set to true if the response payload contains a GraphQL error | | `baggage` | Yes | | The name of a baggage item | | `env` | Yes | | The name of an environment variable | | `static` | No | | A static string value | -| `error` | No | `reason` | a string value containing error reason when it's a critical error | +| `error` | No | `reason` | A string value containing error reason when it's a critical error | ### Subgraph @@ -75,15 +75,15 @@ The subgraph service executes multiple times during query execution, with each e |-----------------------------|-------------|------------------|--------------------------------------------------------------------------------| | `subgraph_operation_name` | Yes | `string`\|`hash` | The operation name from the subgraph query | | `subgraph_operation_kind` | No | `string` | The operation kind from the subgraph query | -| `subgraph_query` | Yes | `string` | The graphql query to the subgraph | +| `subgraph_query` | Yes | `string` | The GraphQL query to the subgraph | | `subgraph_name` | No | `true`\|`false` | The subgraph name | | `subgraph_query_variable` | Yes | | The name of a subgraph query variable | -| `subgraph_response_data` | Yes | | Json Path into the subgraph response body data (it might impact performance) | -| `subgraph_response_errors` | Yes | | Json Path into the subgraph response body errors (it might impact performance) | +| `subgraph_response_data` | Yes | | JSON Path into the subgraph response body data (it might impact performance) | +| `subgraph_response_errors` | Yes | | JSON Path into the subgraph response body errors (it might impact performance) | | `subgraph_request_header` | Yes | | The name of a subgraph request header | | `subgraph_response_header` | Yes | | The name of a subgraph response header | | `subgraph_response_status` | Yes | `code`\|`reason` | The status of a subgraph response | -| `subgraph_on_graphql_error` | No | `true`\|`false` | Boolean set to true if the subgraph response payload contains a graphql error | +| `subgraph_on_graphql_error` | No | `true`\|`false` | Boolean set to true if the subgraph response payload contains a GraphQL error | | `supergraph_operation_name` | Yes | `string`\|`hash` | The operation name from the supergraph query | | `supergraph_operation_kind` | Yes | `string` | The operation kind from the supergraph query | | `supergraph_query` | Yes | `string` | The graphql query to the supergraph |