Skip to content

Upgrade to otel 0.30 #205

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

Open
wants to merge 2 commits into
base: v0.1.x
Choose a base branch
from

Conversation

BSteffaniak
Copy link

@BSteffaniak BSteffaniak commented May 23, 2025

Hi, I upgraded to the newest opentelemetry 0.30 and it broke compatibility with this crate. This should hopefully fix those incompatibility issues.

Motivation

There were some breaking changes with the upgrade to otel 0.30: https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/CHANGELOG.md#0300

I was able to fix upgrade them without much of an issue. The only compilation issues were in the metrics_publishing test. A few of the types used in that test now require the experimental_metrics_custom_reader feature to be enabled in the opentelemetry-sdk package.

Solution

Bump the versions & fix the one test file that had compilation errors.

Please let me know if I'm missing anything. Thanks!

@BSteffaniak
Copy link
Author

BSteffaniak commented May 23, 2025

There were definitely some weird things with the downcasting that are now potentially problematic with this update. I was able to manually impl AsAny, but after testing (with the metrics_gauge_unstable feature enabled) a bit more it seems like that might not be fully working. I'm not super experienced with std::any::Any (I try to stay away from that), so I might be missing something silly.

@BSteffaniak BSteffaniak force-pushed the upgrade-otel-to-0.30 branch from e6102bb to 037db4e Compare May 23, 2025 20:55
@BSteffaniak
Copy link
Author

Ok, I think I was able to fix the rest of the AsAny errors. I just needed to fill out the rest of the match arms. It still feels a bit off... but again, I don't really write much AsAny, so I could have done that all wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant