Dash0 acquires Polar Signals
Monitor kgateway API Gateway performance, traffic routing, and resource usage with native OpenTelemetry metrics and distributed tracing.
kgateway is a cloud-native API Gateway and AI Gateway built on Envoy Proxy that implements the Kubernetes Gateway API. It provides a modern, standards-based solution for managing ingress traffic in Kubernetes clusters with advanced routing, observability, and AI traffic management capabilities.
The Dash0 integration provides comprehensive observability for kgateway deployments using native OpenTelemetry instrumentation for distributed tracing, Prometheus metrics, and structured access logs with automatic trace correlation.
For more information, visit the kgateway Documentation.
Gain comprehensive visibility into your kgateway setup and optimize performance with the following observability features:
Use this integration to monitor ingress traffic, debug routing issues, analyze performance patterns, and ensure your Kubernetes Gateway API implementation operates reliably at scale.
kgateway includes native support for observability via OpenTelemetry distributed tracing (OTLP/gRPC), Prometheus metrics, and structured access logs using OTLP LogRecord format with automatic TraceID and SpanID correlation.
This integration uses the recommended pattern of deploying an OpenTelemetry Collector in your cluster to collect telemetry from kgateway and forward it to Dash0.
For more details, refer to the kgateway Documentation and Envoy Observability Documentation.
You'll need an OpenTelemetry Collector deployed in your cluster to collect telemetry from kgateway and forward it to Dash0.
For production environments, consider using one of these deployment methods:
Helm Chart for The OpenTelemetry Collector
For a complete working example with collector configuration, see the Dash0 kgateway Example.
The OpenTelemetry Collector needs specific configuration to collect all three signals from kgateway:
Configure the Collector to receive distributed traces and access logs from kgateway using the otlp receiver:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318kgateway sends both traces and logs to the same OTLP receiver. Traces use W3C trace context propagation, and access logs are sent as OTLP LogRecords with automatic TraceID and SpanID correlation—no manual parsing or transformation needed.
Configure the Collector to scrape metrics from both the kgateway controller and proxy using the prometheus receiver:
receivers:
prometheus:
config:
scrape_configs:
# kgateway controller metrics
- job_name: "kgateway-controller"
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- kgateway-system
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
action: keep
regex: kgateway
- source_labels: [__meta_kubernetes_pod_container_port_name]
action: keep
regex: metrics
- source_labels: [__meta_kubernetes_pod_name]
target_label: pod
- source_labels: [__meta_kubernetes_namespace]
target_label: namespace
# kgateway gateway proxy metrics (Envoy)
- job_name: "kgateway-proxy"
kubernetes_sd_configs:
- role: pod
namespaces:
names:
- kgateway-system
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: "true"
- source_labels: [__meta_kubernetes_pod_label_kgateway]
action: keep
regex: kube-gateway
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
target_label: __address__
regex: (.+)
replacement: ${1}:9091
- source_labels: [__meta_kubernetes_pod_name]
target_label: pod
- source_labels: [__meta_kubernetes_namespace]
target_label: namespaceCreate an HTTPListenerPolicy to configure tracing and access logs for your Gateway:
apiVersion: gateway.kgateway.dev/v1alpha1
kind: HTTPListenerPolicy
metadata:
name: telemetry-policy
namespace: kgateway-system
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: http
tracing:
provider:
openTelemetry:
serviceName: kgateway-http
grpcService:
backendRef:
name: otel-collector-opentelemetry-collector
namespace: opentelemetry
port: 4317
spawnUpstreamSpan: true
accessLog:
- openTelemetry:
grpcService:
backendRef:
name: otel-collector-opentelemetry-collector
namespace: opentelemetry
port: 4317
logName: "kgateway-access-logs"
body: >-
{"start_time": "%START_TIME%", "method": "%REQ(:METHOD)%", "path": "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%", "protocol": "%PROTOCOL%", "response_code": %RESPONSE_CODE%, "response_flags": "%RESPONSE_FLAGS%", "bytes_received": %BYTES_RECEIVED%, "bytes_sent": %BYTES_SENT%, "duration": %DURATION%, "upstream_service_time": "%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%", "x_forwarded_for": "%REQ(X-FORWARDED-FOR)%", "user_agent": "%REQ(USER-AGENT)%", "request_id": "%REQ(X-REQUEST-ID)%", "authority": "%REQ(:AUTHORITY)%", "upstream_host": "%UPSTREAM_HOST%"}Since the HTTPListenerPolicy in kgateway-system needs to reference the collector service in opentelemetry namespace, create a ReferenceGrant:
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
name: allow-otel-collector-access
namespace: opentelemetry
spec:
from:
- group: gateway.kgateway.dev
kind: HTTPListenerPolicy
namespace: kgateway-system
to:
- group: ""
kind: Service
name: otel-collector-opentelemetry-collectorTo verify that telemetry is flowing:
service.name = "kgateway-http"envoy_* and kgateway_* metricscurl -H 'Host: your-app.example.com' http://your-gateway-ip/