diff --git a/docs/docs/api-reference/metadata-api/observability.mdx b/docs/docs/api-reference/metadata-api/observability.mdx new file mode 100644 index 00000000000..ef48d225a27 --- /dev/null +++ b/docs/docs/api-reference/metadata-api/observability.mdx @@ -0,0 +1,68 @@ +--- +sidebar_label: Observability Options +sidebar_position: 20 +description: Manage observability options with the Hasura metadata API +keywords: + - hasura + - docs + - metadata API + - API reference + - observability options + - metrics config + - enterprise + - ee + - monitoring +--- + +# Metadata API Reference: Observability Options + +
Available on: Cloud and Enterprise Edition
+ +## Introduction + +The API to manage `Observability` related metadata configurations. + +## Logs and metrics configuration + +These is the set of configurations that governs the metrics and logging output for various debugging and analytics +purposes. + +## set_metrics_config {#metadata-set-metrics-config} + +`set_metrics_config` is used to add/update logs and metrics configurations. + +```http +POST /v1/metadata HTTP/1.1 +Content-Type: application/json +X-Hasura-Role: admin +{ + "type": "set_metrics_config", + "args": { + "analyze_query_variables": false + } +} +``` + +### Args syntax {#set-metrics-config-syntax} + +| Key | Required | Schema | Description | +|-------------------------|----------|-----------|-----------------------------------------------------------------------------------------------------| +| analyze_query_variables | false | boolean | Enables logging of the values of the query variables provided for each request. Default is `false`. | + +The corresponding feature documentation for the usage of these configurations can be found +[here](/observability/operations.mdx#capture-query-variables). + + +## remove_metrics_config {#metadata-remove-metrics-config} + +`remove_metrics_config` is used to remove all metrics configurations. + +```http +POST /v1/metadata HTTP/1.1 +Content-Type: application/json +X-Hasura-Role: admin +{ + "type": "remove_metrics_config", + "args": {} +} +```