Skip to main content
Gateway exposes metrics in the Prometheus format that you can scrape and send to your external log management system. The metrics endpoint is <gateway_host>:<gateway_port>/metrics of your deployed Gateway instance. For example: localhost:8888/metrics.
If GATEWAY_SECURED_METRICS is enabled (which is the default), you’ll have to use the credentials specified in GATEWAY_ADMIN_API_USERS to access the metrics.

Prometheus metric suffixes

When metrics are exported to Prometheus, suffixes are automatically appended based on the metric type:
  • Counter: _total suffix (e.g., gateway_bytes_exchanged_total)
  • Timer (summary): _seconds_count, _seconds_sum and _seconds_max suffixes (e.g., gateway_apiKeys_latency_request_response_seconds_count)
  • Timer (histogram): same as summary, plus _seconds_bucket with a le label for histogram buckets (e.g., gateway_latency_request_response_seconds_bucket). Only gateway_latency_request_response is exported as a histogram.
  • Gauge: no suffix (e.g., gateway_active_connections_vcluster)
The table below lists the Prometheus metric names as they appear when scraped. Dots (.) in the underlying metric name are converted to underscores (_).
Prometheus metric nameMetric typeLabelsDescription
Upstream connection metrics
gateway_upstream_connection_close_rate_seconds_countsummaryThe number of connections closed
gateway_upstream_connection_close_rate_seconds_sumsummaryTotal time spent closing connections
gateway_upstream_connection_close_rate_seconds_maxgaugeMaximum time spent closing a connection
gateway_upstream_connection_close_totalcounterThe total number of connections closed
gateway_upstream_connection_creation_rate_seconds_countsummaryThe number of new connections established
gateway_upstream_connection_creation_rate_seconds_sumsummaryTotal time spent creating connections
gateway_upstream_connection_creation_rate_seconds_maxgaugeMaximum time spent creating a connection
gateway_upstream_connection_creation_totalcounterThe total number of new connections established
gateway_upstream_select_rate_seconds_countsummaryThe number of times the I/O layer checked for new I/O to perform
gateway_upstream_select_rate_seconds_sumsummaryTotal time spent on I/O select operations
gateway_upstream_select_rate_seconds_maxgaugeMaximum time spent on a single I/O select operation
gateway_upstream_select_totalcounterThe total number of times the I/O layer checked for new I/O to perform
gateway_upstream_io_wait_rate_seconds_countsummaryThe number of times the I/O thread spent waiting
gateway_upstream_io_wait_rate_seconds_sumsummaryTotal time the I/O thread spent waiting
gateway_upstream_io_wait_rate_seconds_maxgaugeMaximum time the I/O thread spent waiting in a single wait
gateway_upstream_io_wait_totalcounterThe total time the I/O thread spent waiting
Connection metrics
gateway_active_connections_vclustergaugevclusterThe number of active connections per Virtual Cluster
gateway_upstream_connections_upstream_connectedgaugename, threadIdThe number of connections from Gateway to the backing Kafka cluster
gateway_upstream_io_nodesgaugeclusterIdThe number of Kafka nodes
gateway_backend_brokered_active_connectionsgaugeThe number of active backend brokers on the MAIN cluster
Latency metrics
gateway_latency_request_response_seconds_counthistogramThe number of requests processed
gateway_latency_request_response_seconds_sumhistogramThe total round-trip latency from Gateway to Kafka and back
gateway_latency_request_response_seconds_maxgaugeThe maximum round-trip latency from Gateway to Kafka and back
gateway_latency_request_response_seconds_buckethistogramleHistogram buckets for round-trip latency distribution
gateway_latency_request_response_secondsgaugequantileRound-trip latency percentiles per Gateway instance (p30, p50, p95, p99)
gateway_apiKeys_latency_request_response_seconds_countsummaryapiKeysThe number of requests processed per API key
gateway_apiKeys_latency_request_response_seconds_sumsummaryapiKeysThe total latency per API key
gateway_apiKeys_latency_request_response_seconds_maxgaugeapiKeysThe maximum latency per API key
gateway_apiKeys_throttle_ms_seconds_countsummaryapiKeysThe number of throttled responses per API key
gateway_apiKeys_throttle_ms_seconds_sumsummaryapiKeysThe total throttle time in Kafka broker responses per API key. Reflects throttling imposed by Kafka (for example, due to quota violations).
gateway_apiKeys_throttle_ms_seconds_maxgaugeapiKeysThe maximum throttle time in Kafka broker responses per API key
Throughput metrics
gateway_bytes_exchanged_totalcounterdirectionThe total bytes exchanged between clients and Gateway. Tagged by direction: upstream (from clients toward Kafka) or downstream (from Kafka toward clients).
gateway_bytes_exchanged_vcluster_totalcountervcluster, directionThe total bytes exchanged between Gateway and Kafka brokers for a Virtual Cluster
gateway_bytes_exchanged_topic_totalcountervcluster, direction, topic, apiKeysThe total bytes exchanged within the context of a specific topic
Thread metrics
gateway_thread_request_received_totalcounterthreadId, nameClient requests received and forwarded to Kafka, per Gateway thread
gateway_thread_request_rebuild_totalcounterapi_key, name, threadId, vclusterRequests rebuilt per Gateway thread
gateway_request_expired_totalcounterthread, apiKey, vcluster*, username*, clusterId*, nodeId*The number of client requests that timed out waiting for a response from Kafka. Labels marked with * are conditional and only present when available.
gateway_thread_tasksgaugethreadId, nameThe number of pending tasks on the Gateway thread (where all request/response rebuilding happens)
Per-user metrics
gateway_error_per_apiKeys_totalcountervcluster, username, apiKeysThe total Gateway processing exceptions per API key for the specified Virtual Cluster and username
gateway_current_inflight_apiKeys_totalcountervcluster, username, apiKeysThe current inflight API keys of the specified Virtual Cluster and username
gateway_failed_authentications_totalcountervcluster, user, apiKeysThe number of authentication attempts that failed for each user
Storage metrics
gateway_kcache_sizegaugetypeThe size of the kcache (equal to the number of key-value pairs in the cache)
gateway_topic_log_end_offsetgaugevcluster, topic, partitionThe log end offset of logical topics
gateway_topic_current_offsetgaugevcluster, group, topic, partitionThe current offset of a consumer group on a logical topic
License metrics
gateway_license_remaining_daysgaugeThe number of days remaining on your Gateway license
The gateway_topic_log_end_offset and gateway_topic_current_offset metrics are currently only populated for topics using topic concentration. For non-concentrated topics, use standard Kafka consumer lag monitoring.