Skip to content

Add log message for partial failure on push #4853

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

Merged
Merged
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
1 change: 1 addition & 0 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,7 @@ func (i *Ingester) Push(ctx context.Context, req *cortexpb.WriteRequest) (*corte
// of it, so that we can return it back to the distributor, which will return a
// 400 error to the client. The client (Prometheus) will not retry on 400, and
// we actually ingested all samples which haven't failed.
level.Warn(logutil.WithContext(ctx, i.logger)).Log("msg", "partial failure to push", "err", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious on if this log would be too noisy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't expect it to be. This is just in failures cases to append to tsdb, because of limit or storage issue. The idea behind is to use this with the new header to log feature (#4803). That would allow us to have a tracker between distributor and ingester issue.
Currently ingester does not log any message on this type of failures, and the log in the server middleware does not implement the header logs feature from cortex, which seems correct as it is a generic logging.

switch cause := errors.Cause(err); cause {
case storage.ErrOutOfBounds:
sampleOutOfBoundsCount++
Expand Down