[chore] Upgrade prometheus and k8s dependencies#43890
Merged
dmitryax merged 5 commits intoopen-telemetry:mainfrom Oct 31, 2025
Merged
[chore] Upgrade prometheus and k8s dependencies#43890dmitryax merged 5 commits intoopen-telemetry:mainfrom
dmitryax merged 5 commits intoopen-telemetry:mainfrom
Conversation
c200374 to
373b138
Compare
373b138 to
ad1f448
Compare
ChrsMark
approved these changes
Oct 30, 2025
songy23
approved these changes
Oct 30, 2025
1 task
Member
|
This may actually need a changelog - defer to the code owners |
Member
|
breaks |
krajorama
added a commit
to krajorama/opentelemetry-collector-contrib
that referenced
this pull request
Oct 31, 2025
In the dependency upgrade open-telemetry#43890 there was the PR prometheus/prometheus#16429 which changed the provisions for staleness tracking. Now the code only does the tracking if the series was successfully appended in storage. This is indicated by a non zero storage reference returned by the appender. Since we used to return 0 in all cases, the staleness tracking is now broken. Solution is to return a fake reference of 1, just to indicate success. Alternative solution would be to make a unique reference for each series label set, but that incurs an overhead which we can avoid. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
songy23
pushed a commit
that referenced
this pull request
Oct 31, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description In the dependency upgrade #43890 there was the PR prometheus/prometheus#16429 which changed the provisions for staleness tracking. Now the code only does the tracking if the series was successfully appended in storage. This is indicated by a non zero storage reference returned by the appender. Since we used to return 0 in all cases, the staleness tracking is now broken. Solution is to return a fake reference of 1, just to indicate success. Alternative solution would be to make a unique reference for each series label set, but that incurs an overhead which we can avoid. Performance impact: probably small as the cache should be stable over time - unless targets churn a lot between receiver instances. Resource utilization: +1 hashmap with series identifier (name+labels) pointing to cache entries. Size related to number of series. `addRef` here: https://github.com/prometheus/prometheus/blob/c8f1de18a7870e5dc99ed50119c194691c41e41c/scrape/scrape.go#L1089 <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #43893 <!--Describe what testing was performed and which tests were added.--> #### Testing Un-skip related tests. --------- Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
4 tasks
jelly-afk
pushed a commit
to jelly-afk/opentelemetry-collector-contrib
that referenced
this pull request
Nov 6, 2025
Both k8s and prometheus libraries have to be updated because they depend on each other and both have breaking changes. The following files changed to adopt to the API breaking changes: - processor/k8sattributesprocessor/internal/kube/fake_informer.go: - kubernetes/kubernetes#126387 - receiver/prometheusreceiver/metrics_receiver.go: - prometheus/prometheus#16257 - receiver/prometheusremotewritereceiver/receiver.go: - prometheus/prometheus#17160 I haven't touched any usages of deprecated k8s API to keep the changeset small. Created a separate issue for that instead open-telemetry#43891 Some prometheus tests are failing due to behavioral change in prometheus library. I skipped them for now and reported open-telemetry#43893
3 tasks
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.
Both k8s and prometheus libraries have to be updated because they depend on each other and both have breaking changes.
The following files changed to adopt to the API breaking changes:
desymbolizeLabelsfunction in prompb/io/prometheus/write/v2/symbols.go prometheus/prometheus#17160I haven't touched any usages of deprecated k8s API to keep the changeset small. Created a separate issue for that instead #43891
Some prometheus tests are failing due to behavioral change in prometheus library. I skipped them for now and reported #43893