Metrics

Qtap exposes Prometheus-compatible metrics endpoints for monitoring HTTP traffic activity and agent health. These can be used to build your own dashboards with Grafana. We have a sample Grafana dashboard available herearrow-up-right.

circle-exclamation

Endpoints

Qtap provides two metrics endpoints on localhost:10001:

/metrics

Application metrics for monitoring HTTP traffic observed by qtap:

  • Request rates and volumes

  • Error rates by status code

  • Response times and latency distributions

  • Request/response payload sizes

  • Traffic patterns by host, method, and protocol

/system/metrics

System metrics for monitoring qtap agent health:

  • eBPF program performance

  • Memory and CPU usage

  • Event processing rates

  • Internal error counts

/devtools/ (Optional)

Interactive browser-based interface for debugging HTTP/S traffic in real-time. Requires ENABLE_DEV_TOOLS=true environment variable.

See DevTools - Interactive Traffic Inspection for the complete guide.

circle-info

Shared Port: Metrics endpoints and DevTools all run on port 10001:

  • /metrics - Application metrics (Prometheus)

  • /system/metrics - Agent health metrics

  • /devtools/ - Interactive debugging UI (requires ENABLE_DEV_TOOLS=true)

Configuration Requirement

triangle-exclamation

Required Configuration

Without the http_metrics plugin, you will only see connection-level metrics like qtap_connection_open_total. The HTTP metrics like qtap_http_requests_total will not be available.

Accessing Metrics

From Host

From Docker

When using --network=host, access directly from the host:

If NOT using host networking, expose port 10001:

Then access:

From Kubernetes

Forward the metrics port:

Access locally:

Available Metrics

HTTP Request Metrics

Metric
Type
Description
Labels

qtap_http_requests_total

Counter

Total HTTP requests observed

host, method, protocol, status_code

qtap_http_requests_duration_ms_bucket

Histogram

Request duration distribution

host, method, protocol, status_code, le

qtap_http_requests_duration_ms_sum

Counter

Total request processing time (ms)

host, method, protocol, status_code

qtap_http_requests_duration_ms_count

Counter

Number of requests measured

host, method, protocol, status_code

qtap_http_requests_size_bytes_bucket

Histogram

Request payload size distribution

host, method, protocol, status_code, le

qtap_http_requests_size_bytes_sum

Counter

Total request payload size (bytes)

host, method, protocol, status_code

qtap_http_requests_size_bytes_count

Counter

Number of requests measured for size

host, method, protocol, status_code

HTTP Response Metrics

Metric
Type
Description
Labels

qtap_http_responses_total

Counter

Total HTTP responses observed

host, method, protocol, status_code

qtap_http_responses_duration_ms_bucket

Histogram

Response duration distribution (TTFB)

host, method, protocol, status_code, le

qtap_http_responses_duration_ms_sum

Counter

Total response time/TTFB (ms)

host, method, protocol, status_code

qtap_http_responses_duration_ms_count

Counter

Number of responses measured

host, method, protocol, status_code

qtap_http_responses_size_bytes_bucket

Histogram

Response payload size distribution

host, method, protocol, status_code, le

qtap_http_responses_size_bytes_sum

Counter

Total response payload size (bytes)

host, method, protocol, status_code

qtap_http_responses_size_bytes_count

Counter

Number of responses measured for size

host, method, protocol, status_code

Combined Metrics

Metric
Type
Description
Labels

qtap_http_duration_ms_bucket

Histogram

Combined request+response duration distribution

None (aggregates all traffic)

qtap_http_duration_ms_sum

Counter

Total combined duration (ms)

None

qtap_http_duration_ms_count

Counter

Number of completed transactions

None

Connection-Level Metrics

These are always available (no plugin required):

Metric
Type
Description
Labels

qtap_connection_open_total

Counter

Total connections opened

direction, remote_addr, remote_port

qtap_connection_close_total

Counter

Total connections closed

direction, remote_addr, remote_port

qtap_connection_active_total

Gauge

Number of currently active connections

direction, remote_addr, remote_port

qtap_connection_protocol_total

Counter

Connections by protocol

protocol

qtap_connection_bytes_sent_total

Counter

Total bytes sent

direction, remote_addr, remote_port

qtap_connection_bytes_recv_total

Counter

Total bytes received

direction, remote_addr, remote_port

qtap_connection_duration_ms

Histogram

Connection duration distribution

direction, remote_addr, remote_port, le

qtap_connection_tls_handshake_total

Counter

Total TLS handshakes completed

direction, remote_addr, remote_port, sni, version

Common Queries

Request Rate

Error Rate

Average Response Time

95th Percentile Latency

Traffic by Host

HTTP/2 Traffic

Average Request Size

Overall Transaction Duration

Active Connections

TLS Handshake Rate

Label Cardinality

Metrics include labels for host, method, protocol, and status_code. This enables powerful filtering but can increase cardinality in high-traffic environments.

To reduce cardinality:

  1. Filter noisy processes using Traffic Capture Settings:

  1. Use domain-specific capture to limit metrics to important services:

  1. Implement Prometheus recording rules to pre-aggregate metrics

Troubleshooting

No HTTP Metrics Appearing

If you don't see qtap_http_requests_total or other HTTP metrics:

  1. Verify the http_metrics plugin is configured:

  1. Restart qtap after adding the plugin:

  1. Verify metrics are now available:

Metrics Show Zero Values

If metrics exist but show zero counts despite HTTP traffic:

  1. Verify qtap is capturing traffic - check logs for HTTP transactions

  2. Check capture direction - ensure tap.direction matches your traffic flow

  3. Verify filters - ensure you're not filtering out all traffic

Only Connection Metrics Available

If you only see qtap_connection_* metrics but no qtap_http_* metrics, the http_metrics plugin is missing from your configuration.

Integration

See the Monitoring Qtap with Prometheus and Grafana guide for step-by-step setup instructions.

For a comprehensive metrics reference including alerting examples, see Prometheus Metrics in the Appendix.

Last updated