Skip to content

Update OTel components to v0.120.x #7663

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
wants to merge 22 commits into from
Closed

Conversation

mauri870
Copy link
Member

@mauri870 mauri870 commented Apr 1, 2025

What does this PR do?

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

This is a copy of #6912 with the conflicts fixed.

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

@mauri870 mauri870 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 labels Apr 1, 2025
@@ -653,6 +657,8 @@ replace (
github.com/dop251/goja_nodejs => github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6
// fsnotify and goja are required for beats import
github.com/fsnotify/fsnotify => github.com/elastic/fsnotify v1.6.1-0.20240920222514-49f82bdbc9e3
// v0.0.0-20250317163643-19cd4e80024f is equivalent to the upstream v0.120.0 release with the Prometheus 0.300 dependency update removed, as it introduced unwanted breaking changes that conflict with Beats.
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => github.com/elastic/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.0.0-20250317163643-19cd4e80024f
Copy link
Member

Choose a reason for hiding this comment

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

This is actually pinned at v0.120.0 because v0.120.1 is a bug fix in the prometheus updates that we removed.

Pinning the rest to v0.120.1 is fine as long as we don't pull in both the v0.120.0 and v0.120.1 versions of contrib through this replace.

@mauri870
Copy link
Member Author

mauri870 commented Apr 1, 2025

/test

1 similar comment
@mauri870
Copy link
Member Author

mauri870 commented Apr 2, 2025

/test

@khushijain21
Copy link
Contributor

/test

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 Apr 3, 2025

Copy link
Contributor

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

@mauri870
Copy link
Member Author

mauri870 commented Apr 7, 2025

Closing this since we migrated directly to v0.121.0 in #7686.

@mauri870 mauri870 closed this Apr 7, 2025
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.

5 participants