Repository navigation
[OTLP/Prometheus] Fix resource caching during metric exporter startup - #7984
Merged
Merged
Conversation
Defer caching exporter resources and Prometheus constant labels until the MeterProvider is attached, preserving resource metadata after early collections. Discovered by Anthropic's OSS Scanner, as bug ANT-2026-FM1O0GUB.
Pull request dashboard statusMerged · refreshed 2026-10-20 07:40 UTC Status above doesn't look right?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7984 +/- ##
=======================================
Coverage 90.21% 90.21%
=======================================
Files 366 366
Lines 21496 21500 +4
Branches 3949 3951 +2
=======================================
+ Hits 19392 19396 +4
Misses 1526 1526
Partials 578 578
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Kielek
marked this pull request as ready for review
October 20, 2026 06:42
Use the existing Verify convention for the HttpListener startup regression, preserving the complete expected scrape output in a verified snapshot. Discovered by Anthropic's OSS Scanner, as bug ANT-2026-FM1O0GUB.
martincostello
approved these changes
Oct 20, 2026
This was referenced Nov 16, 2026
Open
Bump the "src-cart" group with 2 updates across multiple ecosystems
arjun93005/botch_analyst_tool#36
Open
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix addresses a ANT-2026-FM1O0GUB finding from Anthropic's OSS Scanner.
Project enrollment: anthropics/oss-scanner#117.
Changes
An HttpListener scrape during
MeterProviderconstruction could permanentlyremove
target_infoand configured resource constant labels from laterresponses. A periodic OTLP metric collection during construction could likewise
permanently omit resource attributes from later exports.
Cache exporter resources and Prometheus resource constant labels only after
the provider is attached. Add deterministic regression coverage for a scrape
inside a resource detector and for actual OTLP payloads after an early collection,
including a control without the early collection. No public API changes.
Merge requirement checklist
CHANGELOG.mdfile(s) updated for non-trivial changesNote
This PR description was generated with OpenAI Codex.
Footnotes
Yes, I can answer maintainer questions about the content of this PR without using AI. ↩