Skip to content

Conversation

@andrzej-stencel
Copy link
Contributor

@andrzej-stencel andrzej-stencel commented Jul 18, 2025

Proposed commit message

Update github.com/prometheus/prometheus to match OTel Collector v0.130.0

This is needed to update OTel Collector components to v0.130.0 in Elastic Agent repository (elastic/elastic-agent#9054), as the Prometheus receiver depends on github.com/prometheus/prometheus v0.304.3-0.20250703114031-419d436a447a.

The code changes are needed to accommodate breaking changes in Prometheus API.

Checklist

  • My code follows the style guidelines of this project
  • [ ] 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 in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

(cd metricbeat && mage build)

…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
```
@andrzej-stencel andrzej-stencel added release-note:skip The PR should be ignored when processing the changelog backport-8.19 Automated backport to the 8.19 branch backport-9.1 Automated backport to the 9.1 branch labels Jul 18, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 18, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@VihasMakwana
Copy link
Contributor

@andrzej-stencel Looks like the error is now gone. I can build the metricbeat locally.

Could you pelase run make check && make update locally to fix lint errors and push the changes?

Copy link
Contributor

@VihasMakwana VihasMakwana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@andrzej-stencel andrzej-stencel marked this pull request as ready for review July 21, 2025 07:17
@andrzej-stencel andrzej-stencel requested review from a team as code owners July 21, 2025 07:17
@andrzej-stencel andrzej-stencel added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jul 21, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 21, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@mergify
Copy link
Contributor

mergify bot commented Jul 23, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b update-prometheus-to-match-otel-v0.130.0 upstream/update-prometheus-to-match-otel-v0.130.0
git merge upstream/main
git push upstream update-prometheus-to-match-otel-v0.130.0

Copy link
Member

@mauri870 mauri870 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! It's surprising how many breaking changes there are in Prometheus, it seems to happen every time we bump the dependency.

@andrzej-stencel
Copy link
Contributor Author

Superseded by #45886 (and #45667 before that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-9.1 Automated backport to the 9.1 branch release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants