Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion flusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,26 @@ func (s *Server) forward(
if ctx.Err() != nil {
// We exceeded the deadline of the flush context.
span.Add(ssf.Count("forward.error_total", 1, map[string]string{"cause": "deadline_exceeded"}))
entry.WithFields(logrus.Fields{
"dropped": len(metrics),
"cause": "deadline_exceeded",
}).WithError(err).Error("Failed to forward to an upstream Veneur")
} else if statErr, ok := status.FromError(err); ok &&
(statErr.Message() == "all SubConns are in TransientFailure" || statErr.Message() == "transport is closing") {
// We could check statErr.Code() == codes.Unavailable, but we don't know all of the cases that
// could return that code. These two particular cases are fairly safe and usually associated
// with connection rebalancing or host replacement, so we don't want them going to sentry.
span.Add(ssf.Count("forward.error_total", 1, map[string]string{"cause": "transient_unavailable"}))
entry.WithFields(logrus.Fields{
"dropped": len(metrics),
"cause": "transient_unavailable",
}).WithError(err).Error("Failed to forward to an upstream Veneur")
} else {
span.Add(ssf.Count("forward.error_total", 1, map[string]string{"cause": "send"}))
entry.WithError(err).Error("Failed to forward to an upstream Veneur")
entry.WithFields(logrus.Fields{
"dropped": len(metrics),
"cause": "send",
}).WithError(err).Error("Failed to forward to an upstream Veneur")
}
} else {
entry.Info("Completed forward to an upstream Veneur")
Expand Down