Skip to content

feat: Stabilize logger.enabled by removing spec_unstable_logs_enabled feature flag #3036

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 23, 2025

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.

Copy link

linux-foundation-easycla bot commented Jun 23, 2025

CLA Missing ID CLA Not Signed

@Copilot Copilot AI changed the title [WIP] Stabilize logger.enabled in sdk Stabilize logger.enabled by removing spec_unstable_logs_enabled feature flag Jun 23, 2025
Copilot finished work on behalf of cijothomas June 23, 2025 19:30
@Copilot Copilot AI requested a review from cijothomas June 23, 2025 19:30
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@cijothomas cijothomas force-pushed the copilot/fix-3020-4 branch from 1d132dd to 1316105 Compare July 2, 2025 15:38
@cijothomas cijothomas changed the title Stabilize logger.enabled by removing spec_unstable_logs_enabled feature flag feat: Stabilize logger.enabled by removing spec_unstable_logs_enabled feature flag Jul 2, 2025
@@ -2,6 +2,8 @@

## vNext

- **Breaking** Remove `spec_unstable_logs_enabled` feature flag - logger.enabled functionality is now always available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot The changelog make it sound like this is a breaking change to crate that is announced as stable. Given the feature flag was already marked "unstable", please modify changelog so that it'll not scare regular consumers of the crate with breaking change warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the changelog to remove the "Breaking" label and clarify this was removing an experimental feature flag. The entry now reads "Remove experimental spec_unstable_logs_enabled feature flag - logger.enabled functionality is now stabilized and always available." (commit 8b8c805)

@Copilot Copilot AI requested a review from cijothomas July 2, 2025 15:56
Copilot finished work on behalf of cijothomas July 2, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stabilize logger.enabled in sdk
2 participants