Docs: Add metrics_config metadata API docs

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7337
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
GitOrigin-RevId: e852f95917491504a44e425a6ee8176c3644416b
This commit is contained in:
Manas Agarwal 2022-12-27 19:55:57 +05:30 committed by hasura-bot
parent 3fc7320fbd
commit 68f4f8a819

View File

@ -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
<div className='badge badge--primary heading-badge'>Available on: Cloud and Enterprise Edition</div>
## 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": {}
}
```