Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opentelemetry: fix broken build with
default-features = false
(#1949)
## Motivation Currently, `tracing-opentelemetry` v0.17.1 fails to compile with `default-features = false`. This is because there's a `let` binding for `normalized_metadata` with a `None` where the `Some` type can't be inferred. This managed to slip past CI and get released because we were never actually building the crate with its default features disabled, an oversight in our CI configuration. ## Solution This branch fixes the issue by adding an explicit type annotation to the `let` binding, so the `Option`'s type is known and the type error no longer occurs. I also removed a feature-flagged import that was not actually used. I also added `tracing-opentelemetry` to the `cargo hack` CI job. This way, we will now ensure that all its feature combinations are built on CI (including no features), which should prevent this kind of thing from occurring in the future. Without the fix, we can confirm that this job does fail: https://github.com/tokio-rs/tracing/runs/5279139893?check_suite_focus=true Fixes #1944
- Loading branch information