SGLang integration metrics

The official Datadog integration for monitoring SGLang. It collects 99 metrics.

Official summary

Monitor SGLang request performance, token throughput, and KV cache efficiency

Metric types

  • gauge (value at a point in time): 57
  • count (occurrences in the interval): 42

Metrics

Descriptions are the official definitions, unedited.

MetricTypeUnit
sglang.cache_config_infoCache configuration information.gauge-
sglang.cached_tokens.countTotal number of cached prompt tokens.counttoken
sglang.cuda_graph.activeWhether CUDA graph execution is active.gauge-
sglang.cuda_graph.passes.countTotal number of CUDA graph execution passes.count-
sglang.decode.sequence_length_sumSum of sequence lengths currently being decoded.gaugetoken
sglang.disaggregation.bootstrap_failures.countTotal number of failed bootstrap requests.count-
sglang.disaggregation.decode_preallocation_queueRequests waiting for decode preallocation.gauge-
sglang.disaggregation.decode_transfer_queueRequests waiting for decode transfer.gauge-
sglang.disaggregation.kv_transfer.allocation_millisecondsTime spent allocating memory for KV transfers.gaugemillisecond
sglang.disaggregation.kv_transfer.bootstrap_millisecondsTime spent bootstrapping KV transfers.gaugemillisecond
sglang.disaggregation.kv_transfer.gigabytes_per_secondKV cache transfer throughput.gaugegigabyte/second
sglang.disaggregation.kv_transfer.latency_millisecondsKV cache transfer latency.gaugemillisecond
sglang.disaggregation.kv_transfer.megabytesKV cache data transferred.gaugemegabyte
sglang.disaggregation.prefill_bootstrap_queueRequests in the prefill bootstrap queue.gauge-
sglang.disaggregation.prefill_inflight_queueRequests in the prefill inflight queue.gauge-
sglang.disaggregation.prefill_preallocation_queueRequests waiting for prefill preallocation.gauge-
sglang.disaggregation.prefill_retries.countTotal number of retried prefill requests.count-
sglang.disaggregation.transfer_failures.countTotal number of failed KV transfer requests.count-
sglang.e2e_request_latency.secondsEnd-to-end request latency (distribution).gaugesecond
sglang.e2e_request_latency.seconds.countEnd-to-end request latency observation count.count-
sglang.e2e_request_latency.seconds.sumSum of end-to-end request latency.countsecond
sglang.estimated_flops_per_gpu.countEstimated floating-point operations per GPU.countoperation
sglang.estimated_read_bytes_per_gpu.countEstimated bytes read per GPU.countbyte
sglang.estimated_write_bytes_per_gpu.countEstimated bytes written per GPU.countbyte
sglang.forward_execution.seconds.countTotal model forward execution time.countsecond
sglang.generation_throughput.tokens_per_secondGeneration throughput.gaugetoken/second
sglang.generation_tokens.countTotal number of generation tokens processed.counttoken
sglang.http.requests.activeCurrently active HTTP requests.gauge-
sglang.http.requests.countTotal number of HTTP requests.countrequest
sglang.http.responses.countTotal number of HTTP responses.countresponse
sglang.inter_token_latency.secondsInter-token latency (distribution).gaugesecond
sglang.inter_token_latency.seconds.countInter-token latency observation count.count-
sglang.inter_token_latency.seconds.sumSum of inter-token latency.countsecond
sglang.kv_cache.full_attention_usageFull-attention KV cache usage as a fraction.gaugefraction
sglang.kv_cache.hit_ratePrefix KV cache hit rate.gaugefraction
sglang.kv_cache.max_tokensMaximum number of tokens in the KV cache pool.gaugetoken
sglang.kv_cache.pending_preallocation_usageKV cache usage reserved by pending preallocations.gaugefraction
sglang.kv_cache.swa_usageSliding-window-attention KV cache usage as a fraction.gaugefraction
sglang.kv_cache.usageOverall KV cache usage as a fraction.gaugefraction
sglang.kv_cache.used_tokensNumber of tokens currently stored in the KV cache.gaugetoken
sglang.mamba_pool.usageMamba state pool usage as a fraction.gaugefraction
sglang.num_requests.grammar_waitingRequests waiting for grammar compilation.gaugerequest
sglang.num_requests.offline_batch_runningRunning low-priority offline batch requests.gaugerequest
sglang.num_requests.runningNumber of running inference requests.gaugerequest
sglang.num_requests.waitingNumber of inference requests in the waiting queue.gaugerequest
sglang.process.cpu_seconds.countTotal CPU time consumed by the SGLang process.countsecond
sglang.process.max_fdsMaximum number of file descriptors.gauge-
sglang.process.open_fdsNumber of open file descriptors.gauge-
sglang.process.resident_memory_bytesResident memory used by the SGLang process.gaugebyte
sglang.process.start_time_secondsUnix timestamp when the SGLang process started.gaugesecond
sglang.process.virtual_memory_bytesVirtual memory used by the SGLang process.gaugebyte
sglang.prompt_tokens.countTotal number of prompt tokens processed.counttoken
sglang.python.gc.collections.countPython garbage collection runs.count-
sglang.python.gc.objects.collected.countPython objects collected by garbage collection.countobject
sglang.python.gc.objects.uncollectable.countPython objects that garbage collection could not collect.countobject
sglang.python.infoPython runtime information.gauge-
sglang.queue_time.secondsTime requests spend waiting in a queue (distribution).gaugesecond
sglang.queue_time.seconds.countRequest queue-time observation count.count-
sglang.queue_time.seconds.sumSum of request queue time.countsecond
sglang.realtime_tokens.countTokens processed in real time.counttoken
sglang.request.generation_tokensGeneration tokens per request (distribution).gaugetoken
sglang.request.generation_tokens.countGeneration-token histogram observation count.count-
sglang.request.generation_tokens.sumSum of generation tokens observed per request.counttoken
sglang.request.prompt_tokensPrompt tokens per request (distribution).gaugetoken
sglang.request.prompt_tokens.countPrompt-token histogram observation count.count-
sglang.request.prompt_tokens.sumSum of prompt tokens observed per request.counttoken
sglang.request.stage_latency.secondsPer-stage request latency (distribution).gaugesecond
sglang.request.stage_latency.seconds.countPer-stage request latency observation count.count-
sglang.request.stage_latency.seconds.sumSum of per-stage request latency.countsecond
sglang.request.uncached_prompt_tokensUncached prompt tokens per request (distribution).gaugetoken
sglang.request.uncached_prompt_tokens.countUncached prompt-token histogram observation count.count-
sglang.request.uncached_prompt_tokens.sumSum of uncached prompt tokens observed per request.counttoken
sglang.requests.aborted.countTotal number of aborted requests.countrequest
sglang.requests.countTotal number of inference requests processed.countrequest
sglang.requests.pausedNumber of paused requests.gaugerequest
sglang.requests.retractedNumber of currently retracted requests.gaugerequest
sglang.requests.retracted_total.countTotal number of retracted requests.countrequest
sglang.retracted_input_tokens.countInput tokens belonging to retracted requests.counttoken
sglang.retracted_output_tokens.countOutput tokens belonging to retracted requests.counttoken
sglang.routing_keys.activeNumber of routing keys with active requests.gauge-
sglang.scheduler.idle.seconds.countTotal time the scheduler spent idle.countsecond
sglang.scheduler.new_token_ratioRatio used by the scheduler when allocating new tokens.gaugefraction
sglang.scheduler.process_cpu.seconds.countTotal scheduler CPU processing time.countsecond
sglang.scheduler.utilizationScheduler utilization as a fraction.gaugefraction
sglang.spec_decode.accept_lengthAverage speculative decoding acceptance length.gaugetoken
sglang.spec_decode.accept_rateAverage speculative decoding acceptance rate.gaugefraction
sglang.spec_decode.block_accept_lengthAverage accepted speculative tokens per block.gaugetoken
sglang.spec_decode.capture_lengthSpeculative decoding capture length.gaugetoken
sglang.spec_decode.draft_tokensNumber of draft tokens per speculative decoding step.gaugetoken
sglang.spec_decode.stepsNumber of speculative decoding steps.gauge-
sglang.spec_decode.verify_calls.countTotal speculative decoding verification calls.count-
sglang.startup.cuda_graph.secondsTime spent capturing CUDA graphs during startup.gaugesecond
sglang.startup.phase.secondsStartup duration for the phase identified by the phase tag.gaugesecond
sglang.startup.secondsTime taken for the SGLang engine to start.gaugesecond
sglang.time_to_first_token.secondsTime from request receipt to first generated token (distribution).gaugesecond
sglang.time_to_first_token.seconds.countTime-to-first-token observation count.count-
sglang.time_to_first_token.seconds.sumSum of time to first token.countsecond
sglang.weight_load.secondsTime taken to load model weights.gaugesecond
sglang.weight_update.secondsDuration of the most recent weight update from the source identified by the source tag.gaugesecond

Official documentation

Official documentation for the SGLang integration

Metric names and descriptions are the official Datadog integration definitions (Copyright Datadog, Inc., BSD-3-Clause), reproduced unedited. The full license terms are on the About page.