graphql-engine/community/boilerplates/observability/enterprise
Toan Nguyen ce5ff4c367 server: support env template for otel status
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10764
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 3dfb3478cefc8ffa9067295293203e06b3eac90c
2024-04-17 07:25:44 +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/hasura server: support env template for otel status 2024-04-17 07:25:44 +00:00
grafana docs,community: update the observability boilerplate to use OpenTelemetry logs exporter 2023-09-26 11:30:47 +00:00
otel-collector docs,community: update the observability boilerplate to use OpenTelemetry logs exporter 2023-09-26 11:30:47 +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 server: support env template for otel status 2024-04-17 07:25:44 +00:00
dotenv server: support env template for otel status 2024-04-17 07:25:44 +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