Skip to content

Commit

Permalink
Make the new feature experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanahsmith committed Dec 17, 2024
1 parent 69b467a commit c6e1141
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion opentelemetry-appender-tracing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## vNext

- Bump msrv to 1.75.0.
- Include trace_id & span_id when logging from inside a tracing span
- New experimental feature to use trace\_id & span\_id from spans created through the tracing crate (experimental-use-tracing-span-context) [#2438](https://github.com/open-telemetry/opentelemetry-rust/pull/2438)


## 0.27.0
Expand Down
3 changes: 1 addition & 2 deletions opentelemetry-appender-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ tokio = { workspace = true, features = ["full"]}
pprof = { version = "0.13", features = ["flamegraph", "criterion"] }

[features]
default = ["tracing"]
experimental_metadata_attributes = ["dep:tracing-log"]
spec_unstable_logs_enabled = ["opentelemetry/spec_unstable_logs_enabled"]
tracing = ["tracing-opentelemetry"]
experimental-use-tracing-span-context = ["tracing-opentelemetry"]


[[bench]]
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-appender-tracing/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ where
// Visit fields.
event.record(&mut visitor);

#[cfg(feature = "tracing")]
#[cfg(feature = "experimental-use-tracing-span-context")]
if let Some(span) = _ctx.event_span(event) {
use tracing_opentelemetry::OtelData;
let opt_span_id = span
Expand Down Expand Up @@ -511,7 +511,7 @@ mod tests {
}
}

#[cfg(feature = "tracing")]
#[cfg(feature = "experimental-use-tracing-span-context")]
#[test]
fn tracing_appender_inside_tracing_crate_context() {
use opentelemetry_sdk::testing::trace::InMemorySpanExporterBuilder;
Expand Down

0 comments on commit c6e1141

Please sign in to comment.