-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement Backoff in a generic way #11490
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Bogdan Drutu <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11490 +/- ##
==========================================
- Coverage 91.48% 91.19% -0.29%
==========================================
Files 433 434 +1
Lines 23617 23692 +75
==========================================
Hits 21607 21607
- Misses 1642 1717 +75
Partials 368 368 ☔ View full report in Codecov by Sentry. |
"errors" | ||
|
||
"go.opentelemetry.io/collector/consumer/internal" | ||
) | ||
|
||
type ConsumeFunc[T any] func(context.Context, T) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are concerns from #7051 (comment) still relevant with this design?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because we don't change the interface (you can see that I did not change any consumer). Also, if I understand correctly my change is backwards compatible (not breaking change) and equivalent with the previous code, except I extract the common ConsumeFunc. This only hints users that they can implement this instead of every function if their logic is signal agnostic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this block #11492?
I think my change is not a breaking change, unless I am missing something. Would be good to understand if you would call this a breaking change, and how would I validate it in the future. |
I agree it is not. We were discussing if the type change from |
@mx-psi I don't mind waiting for this small change (adding the generic helper func) before stabilizing consumer to be 100% safe. I want first feedback if this improves our story. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
No description provided.