Skip to content

fix(tracing): bound local span retention and share provider cache - #1165

Merged
yaozheng-fang merged 2 commits into
volcengine:mainfrom
evanlowe:fix/bounded-tracing-cache
Oct 13, 2026
Merged

yaozheng-fang merged 2 commits into
volcengine:mainfrom
evanlowe:fix/bounded-tracing-cache

Conversation

@evanlowe

@evanlowe evanlowe commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Long-running tracing retained every sampled span and accumulated session mappings indefinitely. Repeated tracer construction also registered another permanent local collector, amplifying retention of large response payloads.

Bound the local cache to 1,024 spans and 16 MiB of estimated data by default, evict old entries, and share one collector per provider. Add configurable limits and an opt-out while preserving span annotations, trace IDs, and delivery to other exporters. Clear/shutdown release cache state, and local dumps contain only retained history. Include regression coverage and bilingual configuration documentation.

Validation: 75 targeted tests passed after synchronization with main; all pre-commit checks passed, including Ruff and secret scanning. Both changed MDX pages compile. The two runtime tests that failed in the first CI run now read session snapshots and pass locally. Extended runtime checks have 84 passed, 2 expected failures, and one log-capture failure also reproduced on the original PR commit. Production memory behavior and the full test suite have not been validated locally.

@yaozheng-fang
yaozheng-fang merged commit a7569a0 into volcengine:main Oct 13, 2026
9 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