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

Add the Enabled method to the Logger #5071

Merged
merged 9 commits into from
Mar 15, 2024

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Mar 13, 2024

Resolve #4995

  • Add the Enabled method to the Logger in the log API
  • Add the Enabled method to the Processor in the log SDK
  • Update the batch and simple processors to implement the Processor interface

This does not add tests for the MinServerityProcessor due to the Record not being implemented and there is no way to set the severity during testing currently. The plan is to follow up when that changes.

TODO

@MrAlias MrAlias added the area:logs Part of OpenTelemetry logs label Mar 13, 2024
@MrAlias MrAlias added this to the v1.25.0 milestone Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 83.2%. Comparing base (47ac0d4) to head (5e492b5).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #5071     +/-   ##
=======================================
- Coverage   83.2%   83.2%   -0.1%     
=======================================
  Files        243     243             
  Lines      15910   15917      +7     
=======================================
+ Hits       13249   13250      +1     
- Misses      2373    2379      +6     
  Partials     288     288             
Files Coverage Δ
log/logger.go 100.0% <ø> (ø)
log/noop/noop.go 100.0% <100.0%> (ø)
sdk/log/batch.go 0.0% <0.0%> (ø)
sdk/log/logger.go 0.0% <0.0%> (ø)
sdk/log/simple.go 0.0% <0.0%> (ø)

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

I think it would be good to add benchmarks to the API

log/logger.go Show resolved Hide resolved
@MrAlias

This comment was marked as resolved.

@pellared

This comment was marked as resolved.

sdk/log/min_sev.go Outdated Show resolved Hide resolved
log/logger.go Show resolved Hide resolved
sdk/log/processor.go Show resolved Hide resolved
sdk/log/processor.go Show resolved Hide resolved
sdk/log/processor.go Show resolved Hide resolved
@MrAlias
Copy link
Contributor Author

MrAlias commented Mar 14, 2024

cc @dashpole

sdk/log/processor.go Outdated Show resolved Hide resolved
@MrAlias MrAlias merged commit da047e7 into open-telemetry:main Mar 15, 2024
23 of 24 checks passed
@MrAlias MrAlias deleted the add-enabled-method branch March 15, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add an Enabled method to Logger
4 participants