Skip to content

feat(telemetry): align kvcache OTel scope and span names with router standard - #2164

Open
Alex-ai-future wants to merge 1 commit into
llm-d:mainfrom
Alex-ai-future:review/kv-cache-pr-654
Open

feat(telemetry): align kvcache OTel scope and span names with router standard#2164
Alex-ai-future wants to merge 1 commit into
llm-d:mainfrom
Alex-ai-future:review/kv-cache-pr-654

Conversation

@Alex-ai-future

Copy link
Copy Markdown
Contributor

Summary

Align OpenTelemetry naming in the router-internalized kvcache packages with the conventions established in llm-d-kv-cache#654. This allows operators to filter traces across kv-cache and router in a unified dashboard.

Changes

Dimension Before After
Instrumentation scope "llm-d-kv-cache/pkg/kvcache" "llm-d-router/pkg/kvcache"
Span names llm_d.kv_cache.score_tokens, llm_d.kv_cache.scorer.compute, llm_d.kv_cache.index.add, llm_d.kv_cache.index.evict, llm_d.kv_cache.index score_tokens, compute_scores, index_add, index_evict, index_lookup
Tracer helper telemetry.Tracer() from pkg/telemetry tracing.Tracer() from pkg/common/observability/tracing
Attribute keys llm_d.kv_cache.* Unchanged

Impact

Test plan

  • go test ./pkg/kvcache/...
  • go test ./pkg/telemetry/...

Release note

Standardized OpenTelemetry instrumentation scope names and span names for the internalized kvcache packages.

@Alex-ai-future
Alex-ai-future requested review from a team, liu-cong, sagearc and vMaroon as code owners July 24, 2026 06:27
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Unsigned commits detected! Please sign your commits.

For instructions on how to set up GPG/SSH signing and verify your commits, please see GitHub Documentation.

@github-actions github-actions Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 24, 2026
@Alex-ai-future

Copy link
Copy Markdown
Contributor Author

cc @yankay — this aligns the router-internalized kvcache packages with the OTel scope/span naming from llm-d-kv-cache#654, using router-specific scope paths (llm-d-router/pkg/kvcache).

…standard

Apply the same instrumentation scope and span naming conventions from
llm-d-kv-cache#654 to the router-internalized kvcache packages, using
router-specific scope paths.

- Add TracerScope constants for kvcache and kvblock packages
- Use tracing.Tracer() from pkg/common/observability/tracing
- Shorten span names: drop llm_d.kv_cache.* prefix
- Add Lookup span test coverage (hit, miss, error)

Signed-off-by: Alex <jihui.huang@daocloud.io>
@Alex-ai-future
Alex-ai-future force-pushed the review/kv-cache-pr-654 branch from 8b4c099 to d3324df Compare July 24, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant