-
Notifications
You must be signed in to change notification settings - Fork 600
fix: log sdk no longer enables trace feature #3102
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3102 +/- ##
=======================================
+ Coverage 80.1% 80.4% +0.3%
=======================================
Files 126 126
Lines 21957 22218 +261
=======================================
+ Hits 17603 17885 +282
+ Misses 4354 4333 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a7c215b to
086ae05
Compare
scottgerring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to properly tease the signals apart!
The
logsfeature in the OpenTelemetry Rust SDK incorrectly required thetracefeature, preventing users from using only logging functionality without bringing in tracing dependencies.Problem
Previously, enabling only the
logsfeature would fail to compile because:logsfeature explicitly depended onopentelemetry/traceinCargo.tomlTraceContextExtThis violated the principle of feature independence and forced users to include tracing dependencies even when only using logs.
Solution
Made trace context retrieval conditional while preserving existing functionality:
opentelemetry-sdk/Cargo.tomlto remove"opentelemetry/trace"from the logs feature#[cfg(feature = "trace")]Behavior Changes
Before: Logs feature required trace feature
After: Logs feature works independently
Verification
Fixes #3096.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.