OpenTelemetry
Privacy Proxy exports telemetry data using the OpenTelemetry Protocol (OTLP) ↗. You can configure an endpoint to receive this data and forward it to your observability platform.
During onboarding, provide Cloudflare with your OpenTelemetry collector endpoint:
- Endpoint URL: The HTTPS endpoint where telemetry data should be sent.
- Authentication: Headers or credentials required to authenticate with your collector. Supported authentication types include bearer token headers, custom header-based authentication, and mutual TLS (mTLS).
Cloudflare configures your Privacy Proxy instance to export telemetry to this endpoint.
Privacy Proxy exports the following telemetry signals:
| Signal | Description |
|---|---|
| Metrics | Connection counts, request rates, latency histograms, error rates |
| Traces | Per-request traces showing proxy processing time. Traces are sampled at approximately 1% of requests. |
Privacy Proxy exports metrics that help you understand usage patterns and performance.
| Metric | Description |
|---|---|
privacy_proxy_connections_total | Total number of proxy connections |
privacy_proxy_connections_active | Currently active connections |
privacy_proxy_connections_duration_seconds | Connection duration histogram |
| Metric | Description |
|---|---|
privacy_proxy_requests_total | Total CONNECT requests processed |
privacy_proxy_requests_by_status | Requests grouped by response status code |
privacy_proxy_bytes_sent_total | Total bytes sent to destinations |
privacy_proxy_bytes_received_total | Total bytes received from destinations |
| Metric | Description |
|---|---|
privacy_proxy_connect_latency_seconds | Time to establish connection to destination |
privacy_proxy_first_byte_latency_seconds | Time to first byte from destination |
Privacy Proxy includes a Server-Timing header in responses to help measure processing latency from the client side. For full header format details, refer to HTTP headers.
Server-Timing: proxy;dur=12.5The dur value is the processing time in milliseconds introduced by the proxy. Use this header as a client-side SLI (Service Level Indicator) to monitor proxy performance.
To visualize Privacy Proxy metrics in Grafana:
- Configure an OpenTelemetry collector to receive data from Privacy Proxy.
- Export metrics from the collector to Prometheus.
- Create Grafana dashboards using Prometheus as a data source.
# Request rate over timerate(privacy_proxy_requests_total[5m])
# 95th percentile connection latencyhistogram_quantile(0.95, rate(privacy_proxy_connect_latency_seconds_bucket[5m]))
# Error ratesum(rate(privacy_proxy_requests_by_status{status=~"5.."}[5m])) / sum(rate(privacy_proxy_requests_total[5m]))- OpenTelemetry documentation ↗ — Learn more about OpenTelemetry concepts and configuration.
- GraphQL Analytics API — Query metrics programmatically via Cloudflare's GraphQL API.