Skip to content

refactor(metrics): decouple APMPlus meter uploader - #814

Draft
feng-95 wants to merge 2 commits into
volcengine:mainfrom
feng-95:refactor/apmplus-meter-uploader
Draft

refactor(metrics): decouple APMPlus meter uploader#814
feng-95 wants to merge 2 commits into
volcengine:mainfrom
feng-95:refactor/apmplus-meter-uploader

Conversation

@feng-95

@feng-95 feng-95 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the mutable global meter_uploader scan with a thread-safe process registry
  • give APMPlus metrics a private MeterProvider, so an existing 0-reader global provider cannot suppress metrics
  • deduplicate identical metric destinations while allowing distinct destinations
  • route LLM, tool, and skill metrics through one registration path

Dependency and merge order

Verification

Case Global tracer provider APMPlus source Cloud spans Cloud gen_ai_chat_count
direct env VeADK env 4 / 4 unique 1
direct manual VeADK manual 4 / 4 unique 1
global env preconfigured env 4 / 4 unique 1
global manual preconfigured manual 4 / 4 unique 1
global env + manual preconfigured env + manual 4 / 4 unique 1
auto-instrument env auto-instrumented, 0 metric readers env 5 / 5 unique 1
  • relay duplicate counts: 0 for trace spans and metric requests
  • targeted tests: 31 passed after the rebase
  • Ruff 0.11.12 check and format: passed
  • full pytest collection is blocked by optional dependencies missing from the local environment: agentkit.sdk.skills, pypdfium2, and openviking_sdk
  • full pre-commit is blocked before hooks run because local Go cannot parse the gitleaks Go 1.23 toolchain directive; Ruff hooks were run directly and passed

Test report

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