chore: update github.com/prometheus/prometheus to match OTel Collector v0.130.0#45454
Closed
andrzej-stencel wants to merge 10 commits into
Closed
chore: update github.com/prometheus/prometheus to match OTel Collector v0.130.0#45454andrzej-stencel wants to merge 10 commits into
github.com/prometheus/prometheus to match OTel Collector v0.130.0#45454andrzej-stencel wants to merge 10 commits into
Conversation
…tor `v0.130.0` ```console go get github.com/prometheus/prometheus@419d436a447a go mod tidy make notice ```console
Fixes this error:
```console
$ (cd metricbeat && mage build)
>> build: Building metricbeat
# github.com/elastic/beats/v7/metricbeat/helper/prometheus
helper/prometheus/textparse.go:479:84: not enough arguments in call to textparse.New
have ([]byte, string, string, bool, bool, *labels.SymbolTable)
want ([]byte, string, string, bool, bool, bool, *labels.SymbolTable)
Error: running "go build -o metricbeat -buildmode pie -trimpath -ldflags -s -X github.com/elastic/beats/v7/libbeat/version.buildTime=2025-07-18T07:28:58Z -X github.com/elastic/beats/v7/libbeat/version.commit=21d9eb6a31eaf6cd0f1232a1a4de131a52c62643" failed with exit code 1
```
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
andrzej-stencel
commented
Jul 18, 2025
Contributor
|
@andrzej-stencel Looks like the error is now gone. I can build the metricbeat locally. Could you pelase run |
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Contributor
|
This pull request is now in conflicts. Could you fix it? 🙏 |
mauri870
approved these changes
Jul 24, 2025
Member
mauri870
left a comment
There was a problem hiding this comment.
Thanks for this! It's surprising how many breaking changes there are in Prometheus, it seems to happen every time we bump the dependency.
Contributor
Author
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.
Proposed commit message
Update
github.com/prometheus/prometheusto match OTel Collectorv0.130.0This is needed to update OTel Collector components to
v0.130.0in Elastic Agent repository (elastic/elastic-agent#9054), as the Prometheus receiver depends ongithub.com/prometheus/prometheus v0.304.3-0.20250703114031-419d436a447a.The code changes are needed to accommodate breaking changes in Prometheus API.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
(cd metricbeat && mage build)