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

Drop ResilienceTelemetryFactory #1123

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Apr 14, 2023

Details on the issue fix or feature implementation

This PR drops the following public APIs:

  • ResilienceTelemetryFactory
  • NullResilienceTelemetryFactory
  • NullResilienceTelemetry

The ResilienceTelemetry stays public and strategies can use it to report important resilience events. Its signature is expanded to allow passing additional arguments. Internally, ResilienceTelemetry uses DiagnosticSource to report events. In Polly.Extensions we will subscribe to this DiagnosticSource and report the events as logs and metrics.

Additional changes:

  • Introduce non-generic Outcome struct.
  • Allow to override the default DiagnosticSource by specifying it in ResilienceStrategyBuilder.Properties.

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

@martintmk martintmk self-assigned this Apr 14, 2023
@martintmk martintmk added the v8 Issues related to the new version 8 of the Polly library. label Apr 14, 2023
@martintmk martintmk added this to the v8.0.0 milestone Apr 14, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2023

Codecov Report

Merging #1123 (e5c110e) into main (378500a) will increase coverage by 0.16%.
The diff coverage is 100.00%.

❗ Current head e5c110e differs from pull request most recent head eae2d2f. Consider uploading reports for the commit eae2d2f to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1123      +/-   ##
==========================================
+ Coverage   77.71%   77.88%   +0.16%     
==========================================
  Files         200      202       +2     
  Lines        4753     4788      +35     
  Branches      850      858       +8     
==========================================
+ Hits         3694     3729      +35     
  Misses        854      854              
  Partials      205      205              
Flag Coverage Δ
linux 77.88% <100.00%> (+0.16%) ⬆️
macos 77.88% <100.00%> (+0.16%) ⬆️
windows 77.88% <100.00%> (+0.16%) ⬆️

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

Impacted Files Coverage Δ
...dencyInjection/PollyServiceCollectionExtensions.cs 100.00% <ø> (ø)
...rc/Polly.Core/Builder/ResilienceStrategyBuilder.cs 100.00% <100.00%> (ø)
...y.Core/Builder/ResilienceStrategyBuilderContext.cs 100.00% <100.00%> (ø)
src/Polly.Core/Retry/RetryResilienceStrategy.cs 100.00% <100.00%> (ø)
src/Polly.Core/Strategy/Outcome.TResult.cs 100.00% <100.00%> (ø)
src/Polly.Core/Strategy/Outcome.cs 100.00% <100.00%> (ø)
src/Polly.Core/Strategy/OutcomePredicate.cs 100.00% <100.00%> (ø)
src/Polly.Core/Telemetry/ResilienceTelemetry.cs 100.00% <100.00%> (ø)
.../Polly.Core/Telemetry/ResilienceTelemetrySource.cs 100.00% <100.00%> (ø)
...rc/Polly.Core/Telemetry/TelemetryEventArguments.cs 100.00% <100.00%> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@martintmk martintmk enabled auto-merge (squash) April 14, 2023 06:04
@martintmk martintmk force-pushed the mtomka/drop-ResilienceTelemetryFactory branch from c2ddf15 to e5c110e Compare April 14, 2023 06:35
@martintmk martintmk force-pushed the mtomka/drop-ResilienceTelemetryFactory branch from e5c110e to eae2d2f Compare April 14, 2023 06:36
@martintmk martintmk merged commit 8b944d3 into main Apr 14, 2023
@martintmk martintmk deleted the mtomka/drop-ResilienceTelemetryFactory branch April 14, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 Issues related to the new version 8 of the Polly library.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants