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

[sdk-logs] Implement LoggerProviderSdk #4453

Merged
merged 3 commits into from
Apr 28, 2023

Conversation

CodeBlanch
Copy link
Member

Relates to #4433

Changes

  • Implement LoggerProviderSdk in SDK.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)

@CodeBlanch CodeBlanch requested a review from a team April 28, 2023 17:08
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #4453 (8ef395a) into main (361750c) will decrease coverage by 0.64%.
The diff coverage is 6.86%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4453      +/-   ##
==========================================
- Coverage   84.11%   83.47%   -0.64%     
==========================================
  Files         312      312              
  Lines       12367    12469     +102     
==========================================
+ Hits        10402    10408       +6     
- Misses       1965     2061      +96     
Impacted Files Coverage Δ
src/OpenTelemetry/Logs/LoggerProviderSdk.cs 0.00% <0.00%> (ø)
...nTelemetry/Internal/OpenTelemetrySdkEventSource.cs 80.20% <57.14%> (-1.82%) ⬇️
src/OpenTelemetry/BaseExportProcessor.cs 84.00% <100.00%> (+1.39%) ⬆️
src/OpenTelemetry/BaseProcessor.cs 96.77% <100.00%> (+0.10%) ⬆️

... and 3 files with indirect coverage changes


public void AddProcessor(BaseProcessor<LogRecord> processor)
{
OpenTelemetrySdkEventSource.Log.LoggerProviderSdkEvent("Started adding processor.");
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably don't need this as this should cover it:

OpenTelemetrySdkEventSource.Log.LoggerProviderSdkEvent($"Processors added = \"{processorsAdded}\".");

Copy link
Member Author

Choose a reason for hiding this comment

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

This is here because AddProcessor can be called after the provider has been created! But agree, it is wonky. I just took a stab at cleaning it all up. Pushed a couple ToString implementations into public API. LMK what you think about it now!

@CodeBlanch CodeBlanch merged commit f772e93 into open-telemetry:main Apr 28, 2023
@CodeBlanch CodeBlanch deleted the sdk-logs-loggerprovidersdk branch April 28, 2023 20:43
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.

2 participants