We currently have the following ATS connection (meaning TCP connection) metrics in Prometheus for both HTTP and HTTP2:
trafficserver_connections_total{protocol="http",source="client"} trafficserver_connections_total{protocol="http2",source="client"} trafficserver_active_connections_count{protocol="http",source="client"} trafficserver_active_connections_count{protocol="http2",source="client"}
We also track the number of active transactions (meaning HTTP requests) for HTTP:
trafficserver_active_transaction_count{protocol="http",source="client"}
The equivalent number of active transactions (meaning HTTP2 streams) for HTTP2 is missing from Prometheus but ATS tracks them:
$ sudo traffic_ctl --run-root=/srv/trafficserver/tls metric match '.*current_client_streams.*' NOTE: using command line path as RUNROOT proxy.process.http2.current_client_streams 207
We should have proxy.process.http2.current_client_streams in Prometheus as well.
While we are at it, there are a number of other interesting HTTP2 stats exposed by ATS but not available in Prometheus. We should consider adding them too.
$ sudo traffic_ctl --run-root=/srv/trafficserver/tls metric match '.*http2.*' | awk '/^proxy/ {print $1}' NOTE: using command line path as RUNROOT proxy.process.http2.total_client_streams proxy.process.http2.total_transactions_time proxy.process.http2.total_client_connections proxy.process.http2.connection_errors proxy.process.http2.stream_errors proxy.process.http2.session_die_default proxy.process.http2.session_die_other proxy.process.http2.session_die_eos proxy.process.http2.session_die_active proxy.process.http2.session_die_inactive proxy.process.http2.session_die_error proxy.process.http2.session_die_high_error_rate proxy.process.http2.max_settings_per_frame_exceeded proxy.process.http2.max_settings_per_minute_exceeded proxy.process.http2.max_settings_frames_per_minute_exceeded proxy.process.http2.max_ping_frames_per_minute_exceeded proxy.process.http2.max_priority_frames_per_minute_exceeded proxy.process.http2.insufficient_avg_window_update proxy.process.http2.current_client_sessions proxy.process.http2.current_client_connections proxy.process.http2.current_active_client_connections proxy.process.http2.current_client_streams