Skip to content
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

opentelemetry: fix broken build with default-features = false #1949

Merged
merged 3 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/check_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- tracing-macros
- tracing-serde
- tracing-tower
- tracing-opentelemetry
# tracing and tracing-subscriber have too many features to be checked by
# cargo-hack --feature-powerset, combinatorics there is exploding.
#- tracing
Expand Down
4 changes: 1 addition & 3 deletions tracing-opentelemetry/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use opentelemetry::{
trace::{self as otel, noop, TraceContextExt},
Context as OtelContext, Key, KeyValue, Value,
};
#[cfg(not(feature = "tracing-log"))]
use std::borrow::Cow;
use std::fmt;
use std::marker;
use std::time::{Instant, SystemTime};
Expand Down Expand Up @@ -585,7 +583,7 @@ where
let builder_attrs = builder.attributes.get_or_insert(Vec::new());

#[cfg(not(feature = "tracing-log"))]
let normalized_meta = None;
let normalized_meta: Option<tracing_core::Metadata<'_>> = None;
let (file, module) = match &normalized_meta {
Some(meta) => (
meta.file().map(|s| Value::from(s.to_owned())),
Expand Down