From c1dae66970341aa1cabc880e60b48a374af69ef1 Mon Sep 17 00:00:00 2001 From: Rob Dominguez Date: Thu, 16 May 2024 11:32:15 -0500 Subject: [PATCH] Docs: Add metadata references for metrics_config and otel [DOCS-681]: https://hasurahq.atlassian.net/browse/DOCS-681?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10821 GitOrigin-RevId: c9181f435386c93da704698ea160548a94f6dc89 --- .../metadata-format.mdx | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/docs/migrations-metadata-seeds/metadata-format.mdx b/docs/docs/migrations-metadata-seeds/metadata-format.mdx index 72ca964ac62..754863d2c4b 100644 --- a/docs/docs/migrations-metadata-seeds/metadata-format.mdx +++ b/docs/docs/migrations-metadata-seeds/metadata-format.mdx @@ -36,6 +36,8 @@ directories as per the example below: ├─ 📄 graphql_schema_introspection.yaml ├─ 📄 inherited_roles.yaml ├─ 📄 network.yaml +├─ 📄 metrics_config.yaml +├─ 📄 opentelemetry.yaml ├─ 📄 query_collections.yaml ├─ 📄 remote_schemas.yaml ├─ 📄 rest_endpoints.yaml @@ -417,6 +419,47 @@ tls_allowlist: suffix: core.graphql ``` +### metrics_config.yaml + +The `metrics_config.yaml` file contains Metadata related to configuratbility of which GraphQL-related entities are +observable via metrics for debugging and analytics. All values are boolean. More information can be found +[here](/api-reference/metadata-api/observability.mdx#logs-and-metrics-configuration). + +**Example**: Enabling metrics for query-variable analysis, and disabling metrics for the resposne body + +```yaml +analyze_query_variables: true +analyze_response_body: false +``` + +### opentelemetry.yaml + +The `opentelemetry.yaml` file contains Metadata related to configuring your OpenTelemetry receiver. More information can +be found [here](/observability/opentelemetry/index.mdx). + +An example `opentelemetry.yaml` takes this shape: + +```yaml +status: enabled +data_types: + - traces +exporter_otlp: + headers: + - name: x-test-header + value: testing + - name: x-header-from-env + value_from_env: TEST_ENV_VAR + resource_attributes: + - name: stage + value: production + - name: region + value: us-east + otlp_traces_endpoint: http://host.docker.internal:4318/v1/traces + protocol: http/protobuf +batch_span_processor: + max_export_batch_size: 512 +``` + ### query_collections.yaml The `query_collections.yaml` file contains Metadata information about