graphql-engine/community/boilerplates/observability/enterprise
Toan Nguyen 1199b669cb docs: update latest changes of OpenTelemetry, best practices and deprecate Cloud integration
## Description

[Rendered](https://pr-10880---docusaurus-5kcgrtdh3a-wl.a.run.app/docs/latest/observability/opentelemetry/graphql-engine/)
https://hasurahq.atlassian.net/browse/INFV2-20

- Update Grafana dashboards for the latest metrics changes.
- Improve documentation for OpenTelemetry and best practices.
- Remove the `beta` label to move OpenTelemetry to GA
- Add deprecation notes for Hasura Cloud observability integrations

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10880
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sean Park-Ross <94021366+seanparkross@users.noreply.github.com>
GitOrigin-RevId: fcfaefef3a08747fb4f0c582bc91c8b61142ab13
2024-06-24 13:46:09 +00:00
..
alertmanager community: add a observability boilerplate folder 2023-07-19 17:51:31 +00:00
assets/images docs,community: update the observability boilerplate to use OpenTelemetry logs exporter 2023-09-26 11:30:47 +00:00
blackboxexporter community: add a observability boilerplate folder 2023-07-19 17:51:31 +00:00
examples server: add auth hook span and correct server SpanKind for OpenTelemetry spans 2024-06-21 16:59:09 +00:00
grafana docs: update latest changes of OpenTelemetry, best practices and deprecate Cloud integration 2024-06-24 13:46:09 +00:00
otel-collector docs: update latest changes of OpenTelemetry, best practices and deprecate Cloud integration 2024-06-24 13:46:09 +00:00
prometheus docs,community: update the observability boilerplate to use OpenTelemetry logs exporter 2023-09-26 11:30:47 +00:00
.gitignore docs,community: update the observability boilerplate to use OpenTelemetry logs exporter 2023-09-26 11:30:47 +00:00
docker-compose.yml docs: update latest changes of OpenTelemetry, best practices and deprecate Cloud integration 2024-06-24 13:46:09 +00:00
dotenv docs: update latest changes of OpenTelemetry, best practices and deprecate Cloud integration 2024-06-24 13:46:09 +00:00
README.md docs,community: update the observability boilerplate to use OpenTelemetry logs exporter 2023-09-26 11:30:47 +00:00

Hasura Enterprise Observability Demo

An all-in-one observability demo for Hasura GraphQL Engine Enterprise Edition with Prometheus, Jaeger, Alert-manager, Node Exporter, Loki Logs, OpenTelemetry and Grafana dashboards.

Get Started

  • Copy dotenv to .env and configure secrets and EE License Key.
  • Try docker-compose locally with docker-compose up -d, or run the Docker Swarm stack with scripts that are in the util folder.

The default configuration enables the Native Prometheus exporter. If you want to push metrics to 3rd-party services that support OpenTelemetry, first disable the metrics API and configure the OpenTelemetry metrics endpoint to the otel-collector service. Browse the console -> Settings -> OpenTelemetry Exporter and configure the metrics endpoint.

HGE_ENABLED_APIS=metadata,graphql,config

OpenTelemetry Exporter

Components

Here's a list of all the services that are created:

Service Port Description Notes
HGE :8080 Hasura GraphQL Engine
Postgres :5432 Postgres Database Container
Prometheus :9090 Data Aggregator
Alert Manager :9093 Adds Alerting for Prometheus Checks
Grafana :3000 UI To Show Prometheus Data Username: admin, Password: HGEMonitoring!
Node Exporter :9100 Data Collector for Host Stats
Blackbox Exporter :9115 Data Collector for Ping & Uptime
Redis :6379 Latest Redis Cache Container
Jaeger :4318 Jaeger OTLP HTTP
Jaeger :4317 Jaeger OTLP gRPC
Jaeger :4002 Jaeger Web UI
Loki :3100 Loki Logging Collector
Promtail Pushes logs to Loki

Grafana Dashboards

Dashboard templates are collected in the dashboards/hasura folder. You can import those files to your config folders where the Grafana service is configured, or import them directly on the Grafana web UI.

Example

The default GraphQL Engine service uses migration and metadata configuration in the examples/hasura folder to invoke mock requests for metrics demonstration.

FAQs

How can I enable metrics in the the Source Health panel

Currently, only Postgres supports source health check metrics.

To enable Source Health check metrics you need to configure the health check metadata for each data source.

How can I find the Trace ID of GraphQL Requests

You can find the Trace ID in the X-B3-TraceId request header.

Screenshots

Grafana Dashboards

System Monitoring

Hasura Overview

Hasura Health

Hasura HTTP GraphQL Metrics

Hasura Subscriptions

Hasura Events

Hasura Logs & Traces

Alerts

Hasura Alerts