chore(deps): bump @opentelemetry deps to v2.x#4933
Conversation
- Update @opentelemetry/core to ^2.0.0 - Update @opentelemetry/sdk-metrics to ^2.0.0
|
💚 CLA has been signed |
🤖 GitHub commentsJust comment with:
|
🔍 Preview links for changed docs |
I have since signed this. |
|
Happy to make any required changes to fit your standards! |
|
I just noticed that my auto formatter was a bit aggressive in the |
|
@JoshElias Thank you very much for this PR and I'm sorry I haven't responded until now. I'm starting to take a look now. I'm curious about your use case for the OpenTelemetry Bridge in The feature is an experimental one in the Node.js APM agent. Since it was initially added, we've focused on OTel-native equivalent agents: e.g. Elastic's distribution of the OTel Node.js SDK (https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/node, I would expect for OTel-related observability usage that your experience would be much better using an OTel-native app-side agent/SDK and Elastic's OpenTelemetry ingest path. However, I'd love to hear about your usage and experiences. |
|
This work is covered by #5126 which was just merged (but no release with this yet). @JoshElias I'm still interested in your use case and experiences, as I asked above. |
Hey no problem @trentm. You can read about my use case in the issue I raised for this before creating the pr. TLDR; There was a peer dependency conflict with @langfuse/otel that required @opentelemetry/core v2 to resolve. We've been using my fork in meantime at my org. Was really hoping this would be my first useful OSS contribution. Been doing this for many years and still don't have any :(. Would be great to use the official branch though. Thanks for taking a look! :) |
I'm sorry for that. I used the other PR as the basis for my additions only because of a few minor differences. I did credit your name and PR in the release notes. I hope that counts, or acts as consolation.
Ah, I missed the connection to that issue... largely because I took so long to get to this PR. Have you considered using our |
|
@trentm Oh that's super cool regarding the other lib. I will raise that with the team. No worries on the credit. I'm glad I got to talk to a maintainer! Thank you. |
|
FYI: elastic-apm-node@4.18.0 is out with the upgrade to OTel SDK 2.x libs (#5137). |
Description
Update OpenTelemetry dependencies to v2.x and adapt code to the breaking API changes.
Summary
@opentelemetry/sdk-metricsfrom v1.x to v2.x@opentelemetry/coreto v2.xAggregationOptionAPIMeterProvider.addMetricReader()with constructor-based reader registrationBreaking Changes in OTel v2.x Addressed
MeterProvider.addMetricReader()removed - Now pass readers via constructor optionsSumAggregation,LastValueAggregation, etc.) - Now use object-based{ type: AggregationType.SUM }format^18.19.0 || >=20.6.0in OTel SDKChecklist
- [ ] Add tests- [ ] Update TypeScript typings- [ ] Add release notes todocs/release-notes/index.md