From 3d4c1e12840dec23f7cd210fe70a5fb3626d1c6e Mon Sep 17 00:00:00 2001 From: Coenen Benjamin Date: Tue, 30 Apr 2024 22:54:54 +0200 Subject: [PATCH] add a disclaimer for advanced telemetry (#5051) --- docs/shared/telemetry-performance.mdx | 2 ++ .../telemetry/instrumentation/selectors.mdx | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/shared/telemetry-performance.mdx b/docs/shared/telemetry-performance.mdx index d68757fd19..8086094e73 100644 --- a/docs/shared/telemetry-performance.mdx +++ b/docs/shared/telemetry-performance.mdx @@ -2,3 +2,5 @@ Keep in mind that the amount of telemetry you add can impact your router's perfo - Custom metrics, events, and attributes consume more processing resources than standard metrics. Adding too many (standard or custom) can slow your router down. - Configurations such as `events.*.request|error|response` that produce output for all router lifecycle services should only be used for development or debugging, not for production. + +For properly logged telemetry, you should use a log verbosity of `info`. Set the values of `RUST_LOG` or `APOLLO_ROUTER_LOG` environment variables and the `--log` CLI option to `info`. Using less verbose logging, such as `error`, can cause some attributes to be dropped. \ No newline at end of file diff --git a/docs/source/configuration/telemetry/instrumentation/selectors.mdx b/docs/source/configuration/telemetry/instrumentation/selectors.mdx index 5747b80c4d..f4c0398a56 100644 --- a/docs/source/configuration/telemetry/instrumentation/selectors.mdx +++ b/docs/source/configuration/telemetry/instrumentation/selectors.mdx @@ -48,9 +48,9 @@ The supergraph service is executed after query parsing but before query executio | Selector | Defaultable | Values | Description | |--------------------|-------------|-------------------------------------|--------------------------------------| -| `operation_name` | Yes | | The operation name from the query | +| `operation_name` | Yes | `string`|`hash` | The operation name from the query | | `operation_kind` | No | `string` | The operation kind from the query | -| `query` | Yes | `string` | The graphql query | +| `query` | Yes | `string` | 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 | @@ -67,18 +67,18 @@ The subgraph service executes multiple times during query execution, with each e | Selector | Defaultable | Values | Description | |-----------------------------|-------------|-------------------------------------|---------------------------------------------------------------------------------| -| `subgraph_operation_name` | Yes | | The operation name from the subgraph query | +| `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 | | The graphql query to the subgraph | +| `subgraph_query` | Yes | `string` | The graphql query to the subgraph | | `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 performances) | | `subgraph_response_errors` | Yes | | Json Path into the subgraph response body errors (it might impact performances) | | `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 | -| `supergraph_operation_name` | Yes | | The operation name from the supergraph query | +| `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 | | The graphql query to the supergraph | +| `supergraph_query` | Yes | `string` | The graphql query to the supergraph | | `supergraph_query_variable` | Yes | | The name of a supergraph query variable | | `request_context` | Yes | | The name of a request context key | | `response_context` | Yes | | The name of a response context key |