Skip to content

Display TensorRT-LLM AgentX server metrics - #747

Open
cquil11 wants to merge 3 commits into
masterfrom
agent/capture-trtllm-server-metrics
Open

Display TensorRT-LLM AgentX server metrics#747
cquil11 wants to merge 3 commits into
masterfrom
agent/capture-trtllm-server-metrics

Conversation

@cquil11

@cquil11 cquil11 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a TensorRT-LLM server-metrics adapter for Dynamo disaggregated roles
  • expose TensorRT-LLM token, cache, queue, and KV metrics in AgentX charts and aggregates
  • preserve separate prefill and decode metric sources

Follows SemiAnalysisAI/InferenceX#2625 and NVIDIA/TensorRT-LLM#12545.

Validation

  • 24 focused Vitest tests passed
  • oxlint passed
  • oxfmt check passed
  • TypeScript typecheck passed

Note

Medium Risk
Changes versioned ETL that shapes chart_series and aggregate_stats for production benchmarks; incorrect mapping could misreport throughput or cache metrics until backfill, but scope is an additive framework branch with focused tests.

Overview
Adds TensorRT-LLM as a first-class source for AgentX server-metrics charts and aggregate stats, alongside existing vLLM and SGLang paths.

Charts (compute-chart-series)CHART_SERIES_VERSION is bumped to 17. Native trtllm_* metrics now drive KV utilization, host KV, queue depth, decode throughput, prefix-cache hit rate, and prompt-token breakdowns. When TRT-LLM lacks a prompt-token counter, prefill TPS is derived from trtllm_prefill_batch_tokens histogram sum per timeslice (new sumRate handling) plus cached-token rates. Disaggregated Dynamo runs get separate prefill/decode metricSources via a new trtllm server-metrics adapter that maps dynamo_component / disaggregation_mode labels.

Aggregates — The same TRT-LLM metric keys are included in stream-parse extraction for oversized blobs (compute-aggregate-stats, agentic-aggregates), with fallbacks to trtllm_kv_cache_hit_rate when hits/queries counters are missing.

Tests cover TRT-LLM chart extraction and aggregate sampling; the API route catalog SHA for agentic-aggregates is updated.

Reviewed by Cursor Bugbot for commit 10cdc42. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview Aug 28, 2026 3:57pm

Request Review

@cquil11

cquil11 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing because the project scope is now limited to porting active, nondeprecated AMD multi-node configurations to srt-slurm. This PR is outside that scope.

@cquil11 cquil11 closed this Aug 27, 2026
@cquil11

cquil11 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Reopening: this PR predates the recent out-of-scope configuration-porting detour and was closed by mistake during an overly broad cleanup. Its prior state is being restored.

@cquil11 cquil11 reopened this Aug 27, 2026
};

const ADAPTERS: readonly ServerMetricsAdapter[] = [dynamoAdapter, genericAdapter];
const ADAPTERS: readonly ServerMetricsAdapter[] = [trtllmAdapter, dynamoAdapter, genericAdapter];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRT-LLM adapter drops Dynamo router role

Medium Severity

The new trtllm adapter is listed before the Dynamo adapter and matches any framework whose name contains trt, including canonical dynamo-trt. Its role mapping handles prefill/backend/decode/aggregated but not Dynamo frontend/router, so those sources are stored as unknown instead of router. Per-source pickers for Dynamo TRT-LLM disagg runs therefore mislabel the frontend endpoint.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4e703c0. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1e48786. Configure here.

};

const ADAPTERS: readonly ServerMetricsAdapter[] = [dynamoAdapter, genericAdapter];
const ADAPTERS: readonly ServerMetricsAdapter[] = [trtllmAdapter, dynamoAdapter, genericAdapter];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRT-LLM adapter splits worker sources

High Severity

The new trtllm adapter matches any framework containing trt, including dynamo-trt, and keys each source by role, endpointUrl, workerId, dpRank, and engine. That undoes worker-level identity, so one Dynamo worker with multiple ranks or inconsistently labeled series appears as many endpoints with undercounted per-source throughput.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1e48786. Configure here.

'trtllm_prompt_cached_tokens',
'trtllm_prompt_cached_tokens_total',
'trtllm_prompt_tokens',
'trtllm_prompt_tokens_total',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aggregate version not bumped

Medium Severity

TensorRT-LLM keys were added to extractServerMetricSamples, but STATS_VERSION remains 8. The read path and backfill only recompute when the stored version differs, so existing TensorRT-LLM rows keep empty kvCacheUtil and prefixCacheHitRate. Chart extraction correctly bumped CHART_SERIES_VERSION.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1e48786. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant