opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Move NewThrottleRetry from exporterhelper to consumererror

Open dashpole opened this issue 2 years ago • 3 comments

Description:

Part of https://github.com/open-telemetry/opentelemetry-collector/issues/5550.

NewThrottleRetry is an error that is similar in kind to a permanent error: it informs callers how to deal with retries. I think it makes the most sense for the two to live in the same package, since users of NewPermanent will likely also need NewThrottleRetry.

This also makes getting the duration of the throttle retry error cleaner.

It deprecates the previous NewThrottleRetry function.

Testing:

Added unit tests

dashpole avatar Jun 21 '22 20:06 dashpole

Codecov Report

Base: 91.76% // Head: 92.03% // Increases project coverage by +0.26% :tada:

Coverage data is based on head (f0add5d) compared to base (a9f7aab). Patch coverage: 92.85% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5569      +/-   ##
==========================================
+ Coverage   91.76%   92.03%   +0.26%     
==========================================
  Files         218      220       +2     
  Lines       13352    13250     -102     
==========================================
- Hits        12253    12194      -59     
+ Misses        870      832      -38     
+ Partials      229      224       -5     
Impacted Files Coverage Δ
exporter/exporterhelper/queued_retry.go 95.09% <75.00%> (-0.88%) :arrow_down:
consumer/consumererror/throttle.go 100.00% <100.00%> (ø)
exporter/otlpexporter/otlp.go 90.42% <100.00%> (ø)
exporter/otlphttpexporter/otlp.go 80.59% <100.00%> (ø)
obsreport/obsreport_receiver.go 63.58% <0.00%> (-36.42%) :arrow_down:
internal/obsreportconfig/obsreportconfig.go 96.90% <0.00%> (-3.10%) :arrow_down:
service/telemetry.go 87.57% <0.00%> (-2.50%) :arrow_down:
confmap/resolver.go 96.34% <0.00%> (-0.87%) :arrow_down:
pdata/plog/logs.go 96.00% <0.00%> (-0.30%) :arrow_down:
... and 43 more

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 21 '22 20:06 codecov[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Jul 26 '22 03:07 github-actions[bot]

Sorry for the wait @bogdandrutu. This should be ready for review now

dashpole avatar Aug 10 '22 19:08 dashpole

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Oct 14 '22 04:10 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Nov 02 '22 03:11 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Nov 21 '22 03:11 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Dec 06 '22 03:12 github-actions[bot]