You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. Unfortunately, we see that even retryable errors are passed through the hook. This wouldn't be an issue, if we would have an easy way to identify those errors. The current isRetryableBrokerErr function isn't exposed. I propose to make it public or provide another way to identify retryable errors. Our goal is to use the hooks to log errors to alerts instability in our system. Thanks.
The text was updated successfully, but these errors were encountered:
What retryable errors are you seeing? The function you linked to has a lot of internalish logic that isn't general for user facing problems. The current user facing function to identify retryable errors is https://pkg.go.dev/github.com/twmb/franz-go/pkg/kerr#IsRetriable (back when I used the less common "retriable" unfortunately).
// EOF can be returned if a broker kills a connection unexpectedly. Same for ErrClosed.
// The client will reconnect to the broker, so we don't need to log this as an error.
if errors.Is(err, net.ErrClosed) || errors.Is(err, io.EOF) {
return
}
I actually don't know if this can be catched by the function you mentioned. Our general expectation is that we only get an error in hooks after max retry because retry is an internal detail. This would give us the information that something is not working reliably.
Hi, we're using the
OnBrokerWrite
hook to log errrosfranz-go/examples/hooks_and_logging/expansive_prometheus/metrics.go
Line 53 in 293b7c4
The text was updated successfully, but these errors were encountered: