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

feat: Allow event name to be provided to IsEnabled check in Logger #2756

Merged

Conversation

cijothomas
Copy link
Member

Followup to #2735, this PR adds an additional parameter (event name) to be passed to the event_enabled method, allowing consumer to leverage this additional information.
EventName is part of tracing metadata, so there is no extra cost to obtain it.

Modified SdkLogger to pass the name received to the processor, instead of passing scope.name. (Scope.name was empty due to 2735, so it no longer makes sense to pass it. Even without 2735, it was not useful, as scope-name was just the hardcoded crate name of the appender, not particularly useful!)

(Note: EventEnabled is still under experimental feature flag.)

@cijothomas cijothomas requested a review from a team as a code owner March 4, 2025 20:12
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 92.64706% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.5%. Comparing base (88cae2c) to head (8670b09).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-appender-tracing/src/layer.rs 94.8% 3 Missing ⚠️
opentelemetry-sdk/src/logs/export.rs 0.0% 1 Missing ⚠️
opentelemetry/src/logs/noop.rs 0.0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2756   +/-   ##
=====================================
  Coverage   79.5%   79.5%           
=====================================
  Files        123     123           
  Lines      22879   22923   +44     
=====================================
+ Hits       18201   18242   +41     
- Misses      4678    4681    +3     

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

@cijothomas cijothomas merged commit ff33638 into open-telemetry:main Mar 4, 2025
23 checks passed
@cijothomas cijothomas deleted the cijothomas/log-enabled-name branch March 4, 2025 23:40
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.

3 participants