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] Build extension behavior tweaks #4885

Merged

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Sep 25, 2023

Changes

  • Changes the Build extension for traces & metrics so that it isn't possible for a null to be returned, a NotSupportedException will be thrown for invalid builder types (logs updated to also throw)
  • Adds a protected ctor on API LoggerProvider to make it consistent with traces & metrics.

Details

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes

@CodeBlanch CodeBlanch marked this pull request as ready for review September 27, 2023 17:03
@CodeBlanch CodeBlanch requested a review from a team September 27, 2023 17:03
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #4885 (c91d779) into main (6e2f442) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4885   +/-   ##
=======================================
  Coverage   82.93%   82.93%           
=======================================
  Files         294      294           
  Lines       12198    12200    +2     
=======================================
+ Hits        10116    10118    +2     
  Misses       2082     2082           
Flag Coverage Δ
unittests 82.93% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/OpenTelemetry.Api/Logs/LoggerProvider.cs 100.00% <100.00%> (ø)
...ry/Logs/Builder/LoggerProviderBuilderExtensions.cs 100.00% <100.00%> (+2.08%) ⬆️
.../Metrics/Builder/MeterProviderBuilderExtensions.cs 92.30% <100.00%> (+0.85%) ⬆️
...y/Trace/Builder/TracerProviderBuilderExtensions.cs 100.00% <100.00%> (+1.20%) ⬆️

... and 5 files with indirect coverage changes

@CodeBlanch CodeBlanch added pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package labels Sep 27, 2023
@CodeBlanch CodeBlanch merged commit 0b2d036 into open-telemetry:main Sep 28, 2023
49 checks passed
@CodeBlanch CodeBlanch deleted the sdk-build-extension-noop-providers branch September 28, 2023 17:27
@reyang reyang mentioned this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants