inference/research
verifiedhigh · 0.94updated 2026-10-04

SGLang inter-token latency histogram

sglang · histogram

Fields

id
metric-exposures/w3m-sglang-sglang-inter-token-latency-seconds
Metric name
sglang:inter_token_latency_seconds
Metric type
histogram
Unit
seconds
Exposure
prometheus
Endpoint
:30000/metrics
Histogram buckets
0.0020.0040.0060.0080.010.0150.020.0250.030.0350.040.060.080.10.20.40.60.812468
Labels
model_nameengine_typetp_rankpp_rankmoe_ep_rank
Enabled by default
no
Phase scoped
yes
notes
SGLang main, python/sglang/srt/observability/metrics_collector.py, read 2026-10-04. NOT ON BY DEFAULT: nothing is exported unless --enable-metrics (ServerArgs default False), which is also the only thing that mounts /metrics on the server port. Label keys are model_name, engine_type, tp_rank, pp_rank, moe_ep_rank (plus dp_rank under data parallelism, priority under priority scheduling, and anything in extra_metric_labels). Bucket ladders are overridable per histogram via get_histogram_conf_from_env. The observer divides each wall-clock interval by num_new_tokens and increments the bucket num_new_tokens times, so a speculative step carries more weight than a single-token step. That is why this and sglang:request_time_per_output_token_seconds are NOT interchangeable even though they share a bucket ladder.

Notes

SGLang main, python/sglang/srt/observability/metrics_collector.py, read 2026-10-04. NOT ON BY DEFAULT: nothing is exported unless --enable-metrics (ServerArgs default False), which is also the only thing that mounts /metrics on the server port. Label keys are model_name, engine_type, tp_rank, pp_rank, moe_ep_rank (plus dp_rank under data parallelism, priority under priority scheduling, and anything in extra_metric_labels). Bucket ladders are overridable per histogram via get_histogram_conf_from_env. The observer divides each wall-clock interval by num_new_tokens and increments the bucket num_new_tokens times, so a speculative step carries more weight than a single-token step. That is why this and sglang:request_time_per_output_token_seconds are NOT interchangeable even though they share a bucket ladder.

Cross-references