Docs: Turn OTEL into a directory

[DOCS-1987]: https://hasurahq.atlassian.net/browse/DOCS-1987?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10775
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
GitOrigin-RevId: 8f17e6d8b0097965835708d32e217035ff872afd
This commit is contained in:
Rob Dominguez 2024-04-25 08:33:55 -05:00 committed by hasura-bot
parent c10336bade
commit 8b0ae5fcb0
12 changed files with 137 additions and 33 deletions

View File

@ -36,8 +36,8 @@ above.
:::tip More metrics on OpenTelemetry exporter :::tip More metrics on OpenTelemetry exporter
Try the new [OpenTelemetry exporter](/observability/opentelemetry.mdx) to get advanced metrics and traces to connect Try the new [OpenTelemetry exporter](/observability/opentelemetry/index.mdx) to get advanced metrics and traces to
with Azure Monitor. This integration will export the metrics as detailed [here](#view-metrics). connect with Azure Monitor. This integration will export the metrics as detailed [here](#view-metrics).
::: :::

View File

@ -34,8 +34,8 @@ For Hasura Cloud projects, the Datadog Integration is only available on the `Sta
:::tip More metrics on OpenTelemetry exporter :::tip More metrics on OpenTelemetry exporter
Try the new [OpenTelemetry exporter](/observability/opentelemetry.mdx) to get advanced metrics and traces to connect Try the new [OpenTelemetry exporter](/observability/opentelemetry/index.mdx) to get advanced metrics and traces to
with Datadog. This integration will export the metrics as detailed [here](#view-metrics). connect with Datadog. This integration will export the metrics as detailed [here](#view-metrics).
::: :::

View File

@ -37,12 +37,12 @@ choice:
- [New Relic](newrelic.mdx) - [New Relic](newrelic.mdx)
- [Azure monitor](azure-monitor.mdx) - [Azure monitor](azure-monitor.mdx)
- [Prometheus](prometheus.mdx) - [Prometheus](prometheus.mdx)
- [OpenTelemetry](/observability/opentelemetry.mdx) - [OpenTelemetry](/observability/opentelemetry/index.mdx)
:::tip More metrics on OpenTelemetry exporter :::tip More metrics on OpenTelemetry exporter
Try the new [OpenTelemetry exporter](/observability/opentelemetry.mdx) to get advanced metrics and traces to connect Try the new [OpenTelemetry exporter](/observability/opentelemetry/index.mdx) to get advanced metrics and traces to
with the tool of your choice. This integration will export the metrics as detailed connect with the tool of your choice. This integration will export the metrics as detailed
[here](/observability/cloud/prometheus.mdx#metrics-details). [here](/observability/cloud/prometheus.mdx#metrics-details).
::: :::

View File

@ -35,8 +35,8 @@ For Hasura Cloud projects, the New Relic Integration is only available on the `S
:::tip More metrics on OpenTelemetry exporter :::tip More metrics on OpenTelemetry exporter
Try the new [OpenTelemetry exporter](/observability/opentelemetry.mdx) to get advanced metrics and traces to connect Try the new [OpenTelemetry exporter](/observability/opentelemetry/index.mdx) to get advanced metrics and traces to
with New Relic. This integration will export the metrics as detailed [here](#view-metrics). connect with New Relic. This integration will export the metrics as detailed [here](#view-metrics).
::: :::

View File

@ -36,8 +36,8 @@ above.
:::tip More metrics on OpenTelemetry exporter :::tip More metrics on OpenTelemetry exporter
Try the new [OpenTelemetry exporter](/observability/opentelemetry.mdx) to get advanced metrics and traces to connect Try the new [OpenTelemetry exporter](/observability/opentelemetry/index.mdx) to get advanced metrics and traces to
with Prometheus. This integration will export the metrics as detailed connect with Prometheus. This integration will export the metrics as detailed
[here](/observability/cloud/prometheus.mdx#metrics-details). [here](/observability/cloud/prometheus.mdx#metrics-details).
::: :::

View File

@ -34,4 +34,4 @@ Check out the following guides on how to export telemetry data from Hasura Cloud
choice: choice:
- [Prometheus](prometheus/index.mdx) - [Prometheus](prometheus/index.mdx)
- [OpenTelemetry](/observability/opentelemetry.mdx) - [OpenTelemetry](/observability/opentelemetry/index.mdx)

View File

@ -23,20 +23,20 @@ import ProductBadge from '@site/src/components/ProductBadge';
:::tip More metrics on OpenTelemetry exporter :::tip More metrics on OpenTelemetry exporter
Try the new [OpenTelemetry exporter](/observability/opentelemetry.mdx) to get advanced metrics and traces to connect Try the new [OpenTelemetry exporter](/observability/opentelemetry/index.mdx) to get advanced metrics and traces to
with Prometheus. This integration will export the metrics as detailed connect with Prometheus. This integration will export the metrics as detailed
[here](/observability/enterprise-edition/prometheus/metrics.mdx). [here](/observability/enterprise-edition/prometheus/metrics.mdx).
::: :::
## Overview ## Overview
In this section, you'll find information on how to integrate [Prometheus](https://prometheus.io/) with Hasura In this section, you'll find information on how to integrate [Prometheus](https://prometheus.io/) with Hasura Enterprise
Enterprise edition: edition:
- [Integrate Prometheus with Hasura EE and build a Grafana Dashboard](integrate-prometheus-grafana.mdx): - [Integrate Prometheus with Hasura EE and build a Grafana Dashboard](integrate-prometheus-grafana.mdx): Configure
Configure Prometheus integration with Hasura Enterprise Edition. Prometheus integration with Hasura Enterprise Edition.
- [Pre-built dashboards](pre-built-dashboards.mdx): Learn about pre-built dashboards available - [Pre-built dashboards](pre-built-dashboards.mdx): Learn about pre-built dashboards available for Hasura Enterprise
for Hasura Enterprise Edition. Edition.
- [Available metrics](metrics.mdx): Learn about metrics available to monitor the health, - [Available metrics](metrics.mdx): Learn about metrics available to monitor the health, performance and reliability of
performance and reliability of the Hasura GraphQL Engine. the Hasura GraphQL Engine.

View File

@ -90,8 +90,8 @@ to be exported to your observability platform using the appropriate log drivers.
#### Metrics via Prometheus #### Metrics via Prometheus
You can export metrics of your Hasura Enterprise project to Prometheus easily via enabling the `metrics` API. You can find You can export metrics of your Hasura Enterprise project to Prometheus easily via enabling the `metrics` API. You can
more information on this [here](/observability/enterprise-edition/prometheus/integrate-prometheus-grafana.mdx). find more information on this [here](/observability/enterprise-edition/prometheus/integrate-prometheus-grafana.mdx).
For security reasons, the metrics endpoint should not be leaked to the internet. Or if unavoidable, the Prometheus For security reasons, the metrics endpoint should not be leaked to the internet. Or if unavoidable, the Prometheus
secret should be confidential to prevent misuse. secret should be confidential to prevent misuse.
@ -101,13 +101,13 @@ visualize Golden signal metrics that you will love for real-time monitoring.
#### Metrics via OpenTelemetry #### Metrics via OpenTelemetry
Hasura Enterprise is open-telemetry compliant and can export metrics to third-party observability Hasura Enterprise is open-telemetry compliant and can export metrics to third-party observability platforms which
platforms which support OpenTelemetry. Check out [the OpenTelemetry page](/observability/opentelemetry.mdx) for more information. support OpenTelemetry. Check out [the OpenTelemetry page](/observability/opentelemetry/index.mdx) for more information.
#### Distributed traces #### Distributed traces
Hasura Enterprise also can export distributed traces via OpenTelemetry. Read more at Hasura Enterprise also can export distributed traces via OpenTelemetry. Read more at
[here](/observability/opentelemetry.mdx) for more information. [here](/observability/opentelemetry/index.mdx) for more information.
## Database observability ## Database observability
@ -130,8 +130,8 @@ be implemented:
[Query Tags](/observability/query-tags.mdx) are SQL comments that consist of `key=value` pairs that are appended to [Query Tags](/observability/query-tags.mdx) are SQL comments that consist of `key=value` pairs that are appended to
generated SQL statements. When you issue a query or mutation with query tags, the generated SQL has some extra generated SQL statements. When you issue a query or mutation with query tags, the generated SQL has some extra
information. Database analytics tools can use that information (metadata) to analyze DB load and track information. Database analytics tools can use that information (metadata) to analyze DB load and track or monitor
or monitor performance. performance.
### Using Query Tags and **pganalyze** ### Using Query Tags and **pganalyze**

View File

@ -0,0 +1,5 @@
{
"label": "OpenTelemetry",
"position": 6,
"className": "cloud-and-enterprise-icon"
}

View File

@ -0,0 +1,68 @@
---
sidebar_label: Data Connectors
description: Traces via OpenTelemetry for Hasura GraphQL Engine Data Connectors in Enterprise Edition
title: 'Data Connector Traces via OpenTelemetry'
sidebar_class_name: beta-icon
keywords:
- hasura
- docs
- enterprise
- opentelemetry
- open telemetry
- traces
sidebar_position: 3
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Thumbnail from '@site/src/components/Thumbnail';
import ProductBadge from '@site/src/components/ProductBadge';
# Export Traces to OpenTelemetry Compliant Receiver from Hasura Data Connectors
<div className="badge-container">
<ProductBadge free pro ee self />
<div className="badge badge-gray heading-badge">Beta</div>
</div>
## Introduction
Hasura Data Connectors can export and link internal OpenTelemetry data with GraphQL Engine to visualize the full
timeline of a GraphQL request.
:::info Note
At present, data connectors only support traces via OpenTelemetry.
:::
## Configuration
You can easily configure OpenTelemetry for your data connectors using environment variables.
### GraphQL Data Connector
The GraphQL Data Connector — which power sources like Athena, MariaDB, MySQL, Oracle, Redshift, and Snowflake — is built
on top of [Quarkus](https://quarkus.io/) with an OpenTelemetry extension. Therefore, the configuration properties of the
connector also follow that of the extension:
| Environment Variable | Type | Default | Description |
| -------------------------------------- | ------------------------------ | ------- | ----------------------------------------------------------------------------------------------- |
| `QUARKUS_OTEL_EXPORTER_OTLP_ENDPOINT ` | string | | The endpoint of the OpenTelemetry receiver |
| `QUARKUS_OTEL_EXPORTER_OTLP_PROTOCOL ` | enum (`grpc`, `http/protobuf`) | `grpc` | The protocol used to exchange data between the client and the server |
| `QUARKUS_OTEL_EXPORTER_OTLP_HEADERS ` | string | | Key-value pairs to be used as headers associated with requests. i.e.: `key1=value1,key2=value2` |
| `QUARKUS_OTEL_RESOURCE_ATTRIBUTES ` | string | | Specify resource attributes in the following format: `key1=val1,key2=val2` |
See the complete list of configuration reference
[here](https://quarkus.io/version/main/guides/opentelemetry#configuration-reference).
### Mongo Data Connector
The Mongo Data Connector powers MongoDB connections and, thus, has a different configuration:
| Environment Variable | Type | Default | Description |
| ---------------------------------------- | --------------------------------------------------------- | --------------------- | -------------------------------------------------------------------- |
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ` | string | http://localhost:4318 | The endpoint of the OpenTelemetry receiver |
| `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ` | enum (`grpc`, `http/protobuf`) | `http/protobuf` | The protocol used to exchange data between the client and the server |
| `OTEL_SERVICE_NAME ` | string | | Name of the service |
| `OTEL_PROPAGATORS ` | enum (`b3`, `b3multi`, `tracecontext`, `baggage`, `none`) | `tracecontext` | Comma-separate list of propagator schemes to use |

View File

@ -1,7 +1,7 @@
--- ---
sidebar_label: OpenTelemetry sidebar_label: GraphQL Engine
description: Traces via OpenTelemetry for Hasura Enterprise Edition description: Traces via OpenTelemetry for Hasura GraphQL Engine Enterprise Edition
title: 'Traces via OpenTelemetry' title: 'GraphQL Engine Traces via OpenTelemetry'
sidebar_class_name: beta-icon sidebar_class_name: beta-icon
keywords: keywords:
- hasura - hasura
@ -10,7 +10,7 @@ keywords:
- opentelemetry - opentelemetry
- open telemetry - open telemetry
- traces - traces
sidebar_position: 6 sidebar_position: 2
--- ---
import Tabs from '@theme/Tabs'; import Tabs from '@theme/Tabs';

View File

@ -0,0 +1,31 @@
---
sidebar_label: OpenTelemetry
description: Traces via OpenTelemetry for Hasura GraphQL Engine and Data Connectors for Enterprise Edition
title: 'GraphQL Engine and Data Connector Traces via OpenTelemetry'
sidebar_class_name: beta-icon
keywords:
- hasura
- docs
- enterprise
- opentelemetry
- open telemetry
- traces
sidebar_position: 1
---
# OpenTelemetry for Observability
## Introduction
OpenTelemetry provides a robust framework for gathering traces and metrics, allowing you to optimize performance and
monitor your applications effectively. In this section, we will explore how to configure and utilize OpenTelemetry to
export crucial telemetry data for both the Hasura GraphQL Engine and its associated data connectors, ensuring you have
comprehensive insights to maintain and improve your system's operations.
Whether you are looking to fine-tune your deployments or troubleshoot issues, our guide will help you leverage
OpenTelemetry's capabilities to meet your observability needs.
## Options
- [Export OTEL information for Hasura GraphQL Engine](/observability/opentelemetry/graphql-engine.mdx)
- [Export OTEL information for data connectors](/observability/opentelemetry/data-connectors.mdx)