[Docs] Unify strategy descriptions and add Telemetry sections - #2060
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2060 +/- ##
==========================================
+ Coverage 83.67% 83.69% +0.01%
==========================================
Files 312 312
Lines 7106 7114 +8
Branches 1054 1054
==========================================
+ Hits 5946 5954 +8
Misses 789 789
Partials 371 371
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Martin Costello <martin@martincostello.com>
|
@martintmk Is there any particular reason why the TimeSpan? retryAfter = null;
if (lease.TryGetMetadata(MetadataName.RetryAfter, out TimeSpan retryAfterValue))
{
retryAfter = retryAfterValue;
}
var args = new OnRateLimiterRejectedArguments(context, lease);
_telemetry.Report(new(ResilienceEventSeverity.Error, RateLimiterConstants.OnRateLimiterRejectedEvent), context, args);
if (OnLeaseRejected != null)
{
await OnLeaseRejected(new OnRateLimiterRejectedArguments(context, lease)).ConfigureAwait(context.ContinueOnCapturedContext);
}
var exception = retryAfter.HasValue ? new RateLimiterRejectedException(retryAfter.Value) : new RateLimiterRejectedException();
return Outcome.FromException<TResult>(exception.TrySetStackTrace()); |
Frankly, I don't know :D It was probably just an omission as we didn't have any use-case where this would be required. If there is a real-world use-case we can add it there. |
|
One thing I am wondering is to add |
Good idea, I'll do that. |
Co-authored-by: Martin Costello <martin@martincostello.com>
|
@martintmk Do I see it correctly that this |
Co-authored-by: Martin Costello <martin@martincostello.com>
Looks like some leftovers from a refactor to me. |
|
@martincostello , @martintmk How do you like it? |

Pull Request
The issue or feature being addressed
I have found the strategies documentation paged a bit inconsistent:
Aboutsection sometimes contains a short description while other times doesn't.Defaultssections rather vague.Details on the issue fix or feature implementation
Confirm the following