Skip to main content
Version: v2.x

Metrics via Prometheus

Available on: Enterprise Edition

Enable metrics endpoint

By default the Prometheus metrics endpoint is disabled. To enable Prometheus metrics, configure the environment variable below:


Secure the Prometheus metrics endpoint with a secret:

curl '' -H 'Authorization: Bearer <secret>'
  • The metrics endpoint should be configured with a secret to prevent misuse and should not be exposed over the internet.

Metrics exported

hasura_http_connectionsCurrent number of active HTTP connections (excluding WebSocket connections)Gaugenone
hasura_websocket_connectionsCurrent number of active WebSocket connectionsGaugenone
hasura_active_subscriptionsCurrent number of active subscriptionsGaugenone
hasura_graphql_requests_totalNumber of GraphQL requests received (excluding subscriptions)Counter• "operation_type": query|mutation|unknown
• The "unknown" operation type will be returned for queries that fail authorization, parsing, or certain validations
• "response_status": success|failed
hasura_graphql_execution_time_secondsExecution time of successful GraphQL requests (excluding subscriptions)Histogram

Buckets: 0.01, 0.03, 0.1, 0.3, 1, 3, 10
• "operation_type": query|mutation
hasura_event_queue_time_secondsQueueing delay of event trigger batches in the processing queueHistogram

Buckets: 0.01, 0.03, 0.1, 0.3, 1, 3, 10
hasura_event_trigger_http_workersCurrent number of active event trigger HTTP workersGaugenone

The GraphQL request execution time:

  • Uses wall-clock time, so it includes time spent waiting on I/O.
  • Includes authorization, parsing, validation, planning, and execution (calls to databases, remote schemas).