Skip to main content

Enabling metrics

proxy-hopper run --config config.yaml --metrics --metrics-port 9090
Or via config:
server:
  metrics: true
  metricsPort: 9090
Metrics are served at http://localhost:9090/metrics.

Metrics reference

Request metrics

MetricTypeLabelsDescription
proxy_hopper_requests_totalCountertarget, outcomeTotal proxied requests
proxy_hopper_request_duration_secondsHistogramtargetOutbound request latency
proxy_hopper_responses_totalCountertarget, status_codeUpstream HTTP responses by status code
proxy_hopper_retries_totalCountertargetRetry attempts
proxy_hopper_retry_exhaustions_totalCountertargetRequests that exhausted all retries
proxy_hopper_active_connectionsGaugeOpen client connections
outcome values: success, rate_limited, server_error, connection_error, no_match.

Queue metrics

MetricTypeLabelsDescription
proxy_hopper_queue_depthGaugetargetRequests waiting for a free IP
proxy_hopper_queue_wait_secondsHistogramtargetTime spent waiting in the queue
proxy_hopper_queue_expired_totalCountertargetRequests dropped due to queue timeout

IP pool metrics

MetricTypeLabelsDescription
proxy_hopper_available_ipsGaugetargetIPs currently available in pool
proxy_hopper_quarantined_ipsGaugetargetIPs currently quarantined
proxy_hopper_ip_quarantine_events_totalCountertarget, address, provider, regionQuarantine events per IP
proxy_hopper_ip_failure_countGaugetarget, address, provider, regionConsecutive failure count per IP

Probe metrics

MetricTypeLabelsDescription
proxy_hopper_probe_success_totalCounteraddress, provider, regionSuccessful background probes
proxy_hopper_probe_failure_totalCounteraddress, provider, region, reasonFailed background probes
proxy_hopper_probe_duration_secondsHistogramaddress, provider, regionBackground probe latency
proxy_hopper_ip_reachableGaugeaddress, provider, region1 if IP passed last probe, 0 if not
Probe reason values: timeout, proxy_unreachable, connection_error, http_error.

Labels

The provider and region labels on IP-level and probe metrics come from proxyProviders — enabling per-provider and per-region queries:
# Average probe latency by region
avg by (region) (proxy_hopper_probe_duration_seconds)

# Quarantine rate by provider
rate(proxy_hopper_ip_quarantine_events_total[5m]) by (provider)

# Request success rate by target
rate(proxy_hopper_requests_total{outcome="success"}[5m])
  / rate(proxy_hopper_requests_total[5m])

Kubernetes scraping

The Kubernetes deployment manifests include pod annotations for Prometheus auto-discovery:
annotations:
  prometheus.io/scrape: "true"
  prometheus.io/port: "9090"
  prometheus.io/path: "/metrics"
When running multiple replicas, each exposes its own /metrics endpoint.