Skip to content

fix(tracing): include VeADK headers in APMPlus span tags - #1235

Merged
yaozheng-fang merged 1 commit into
volcengine:mainfrom
evanlowe:fix/otlp-span-header-tags
Nov 27, 2026
Merged

yaozheng-fang merged 1 commit into
volcengine:mainfrom
evanlowe:fix/otlp-span-header-tags

Conversation

@evanlowe

@evanlowe evanlowe commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

#1234 added VeADK headers to OTLP requests. A live agent run on the merged main branch showed that APMPlus indexed none of the five header values as span tags. APMPlus queries read attributes from each span payload.

Changes

The VeADK APMPlus trace exporter now writes the effective values of veadk-source, veadk-version, User-Agent, X-Client-Request-Id, and x-is-encrypted into each outgoing span. Case-insensitive exporter overrides are honored, and each tag uses its documented spelling. The explicit allowlist keeps authentication and arbitrary transport headers out of this projection. The exporter modifies its own serialized payload so other exporters can consume the original spans. Public configuration and Python signatures are unchanged.

Verification

  • Ran a real VeADK agent against an Ark model and queried the resulting trace with APMPlus ListSpan. All five spans had all five exact expected tag values (25/25). A second query filtered only by the synthetic request ID and returned the same five spans.
  • The new export-payload regression failed against merged main and passed with this change. It covers nested spans, mixed-case header overrides, same-key attribute replacement, and isolation from an additional exporter.
  • All 73 targeted tracing and metrics tests passed. The new regression also passed with the OTLP exporter at 1.39.0, in addition to the locked 1.42.1. The override uses the gRPC exporter's internal _translate_data hook, which is exercised by the serialized-payload test.
  • All pre-commit hooks, documentation type checks, and the static documentation build passed.

Verified on November 25, 2026.

Submitted commit verification

Built the wheel from commit 3eb3eb70, ran a second real agent from that wheel, and verified the commit-derived version in APMPlus. All 25 tag values matched and the request-ID-only query returned the same five spans.

The full two-worker regression passed with 9,497 passed, 137 skipped, 4 expected failures, and 6 passing subtests. Command: uv run --extra dev --extra codex --extra sandbox --extra extensions pytest -n 2 -m 'not codex_smoke and not piagent_smoke'.

@yaozheng-fang
yaozheng-fang merged commit edbc240 into volcengine:main Nov 27, 2026
14 checks passed
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.

2 participants