Skip to content

Update OTel components to v0.120.x #6912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

andrzej-stencel
Copy link
Contributor

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

What does this PR do?

Updates OTel components to v0.120.0 (core) and v0.120.1 (contrib).

Why is it important?

We should be keeping the components up to date with upstream as much as possible.

OpenTelemetry Collector Contrib updated its github.com/prometheus/prometheus dependency from v0.54.1 to v0.300.1 in v0.120.0 (open-telemetry/opentelemetry-collector-contrib#36873). This resulted in a conflict with Prometheus v0.54.x dependency in Beats. This forced us to temporarily fork the Contrib, revert the v0.300.x update there (elastic/opentelemetry-collector-contrib#3) and import the forked prometheusreceiver module (ca402c6). This resolves the dependency conflict. This was already done on 9.0 branch in #7411 and now we're doing the same thing on main branch.

The plan is to return to upstream, non-forked components as soon as Beats are updated to Prometheus v0.300.x.

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/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

How to test this PR locally

go build .
sudo ./elastic-agent otel

@andrzej-stencel andrzej-stencel added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-8.x Automated backport to the 8.x branch with mergify backport-8.17 Automated backport with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch labels Feb 18, 2025
@andrzej-stencel andrzej-stencel requested a review from a team as a code owner February 18, 2025 13:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@andrzej-stencel
Copy link
Contributor Author

I've created elastic/beats#42748 to resolve the dependency conflict, appreciate any help on this. 🙏

@andrzej-stencel andrzej-stencel changed the title Update otel v0.120.0 Update OTel components v0.120.x Feb 20, 2025
@andrzej-stencel andrzej-stencel changed the title Update OTel components v0.120.x Update OTel components ot v0.120.x Feb 20, 2025
@andrzej-stencel andrzej-stencel changed the title Update OTel components ot v0.120.x Update OTel components to v0.120.x Feb 20, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@cmacknz
Copy link
Member

cmacknz commented Mar 18, 2025

We can now unblock this using the same approach that was used in #7411

We can pin to v0.120 but to go past that we need beats to update to prometheus v0.300 or keep forking OTel releases which I do not want to do.

@andrzej-stencel andrzej-stencel removed the backport-9.0 Automated backport to the 9.0 branch label Mar 27, 2025
I deleted the line importing Prometheus `v0.300.1` from `go.mod` and ran `go mod tidy`.
That restored the dependency in `v0.54.1` version.
@andrzej-stencel andrzej-stencel removed the backport-8.18 Automated backport to the 8.18 branch label Mar 27, 2025
@andrzej-stencel
Copy link
Contributor Author

We can pin to v0.120 but to go past that we need beats to update to prometheus v0.300 or keep forking OTel releases which I do not want to do.

Agree. Updating Beats to Prometheus v0.300 is the way to unblock further OTel updates.

| [nopreceiver](https://github.com/open-telemetry/opentelemetry-collector/blob/receiver/nopreceiver/v0.120.0/receiver/nopreceiver/README.md) | v0.120.0 |
| [otlpreceiver](https://github.com/open-telemetry/opentelemetry-collector/blob/receiver/otlpreceiver/v0.120.0/receiver/otlpreceiver/README.md) | v0.120.0 |
| [prometheusreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/receiver/prometheusreceiver/v0.120.1/receiver/prometheusreceiver/README.md) | v0.120.1 |
| [prometheusreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/receiver/prometheusreceiver/=> github.com/elastic/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20250317163643-19cd4e80024f/receiver/prometheusreceiver/README.md) | => github.com/elastic/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20250317163643-19cd4e80024f |
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong, but we can merge this PR first, and then the fix alongside #7456.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking you rebase your PR on this PR so that we can prove it's doing the right thing?

Copy link
Contributor

Choose a reason for hiding this comment

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

That PR is now merged, you can rebase on main and regenerate the README.

@andrzej-stencel andrzej-stencel removed the backport-8.17 Automated backport with mergify label Mar 27, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 28, 2025

Copy link
Contributor

mergify bot commented Mar 28, 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-otel-v0.120.0 upstream/update-otel-v0.120.0
git merge upstream/main
git push upstream update-otel-v0.120.0

@mauri870 mauri870 mentioned this pull request Apr 1, 2025
3 tasks
@andrzej-stencel
Copy link
Contributor Author

Superseded by #7686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants