opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

Stabilize logger.enabled by removing spec_unstable_logs_enabled feature flag

Open Copilot opened this issue 5 months ago • 1 comments

This PR stabilizes the logger.enabled functionality by completely removing the spec_unstable_logs_enabled feature flag from all OpenTelemetry Rust crates as requested in the issue.

Changes Made

Core Crates Updated

  • opentelemetry: Removed feature flag definition and conditional compilation
  • opentelemetry_sdk: Removed feature flag definition and conditional compilation
  • opentelemetry-appender-log: Removed feature flag definition and conditional compilation
  • opentelemetry-appender-tracing: Removed feature flag definition and conditional compilation

Key Functional Changes

  • Logger::event_enabled() method is now always available (previously behind feature flag)
  • LogProcessor::event_enabled() trait method is now always available
  • LogExporter::event_enabled() trait method is now always available
  • Log level control functionality is now enabled by default in all log appenders

Documentation & Cleanup

  • Updated CHANGELOG.md files for all affected crates
  • Removed documentation references to the feature flag
  • Updated build scripts and benchmarks to remove feature flag references
  • Cleaned up dependencies in stress tests and examples

Breaking Change Notice

This is a breaking change for users who were explicitly enabling the spec_unstable_logs_enabled feature flag. However, the functionality remains identical - it's just always enabled now.

Before:

opentelemetry = { version = "0.30", features = ["logs", "spec_unstable_logs_enabled"] }

After:

opentelemetry = { version = "0.30", features = ["logs"] }

The logger.enabled functionality that was previously experimental is now stable and ready for production use.

Verification

  • ✅ All core crates build successfully
  • ✅ All appender tests pass
  • ✅ Logger.enabled functionality works correctly
  • ✅ No remaining references to the feature flag (except in historical CHANGELOGs)

Fixes #3020.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Jun 23 '25 19:06 Copilot

CLA Missing ID CLA Not Signed

  • :white_check_mark: login: cijothomas / name: Cijo Thomas (13161050b05a217ed8fa0bd2c713acdaeba89a96)
  • :x: The email address for the commit (8b8c80586208910530110e5ec9307ecd7d9f4231) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please submit a support request ticket.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.0%. Comparing base (af2f144) to head (1316105). Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3036     +/-   ##
=======================================
- Coverage   81.1%   80.0%   -1.1%     
=======================================
  Files        126     126             
  Lines      24954   21879   -3075     
=======================================
- Hits       20251   17519   -2732     
+ Misses      4703    4360    -343     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 23 '25 20:06 codecov[bot]