Skip to content

Commit

Permalink
Improve comments on line validation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonswine committed Dec 29, 2022
1 parent 0f139e2 commit c6e116a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/validation/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,17 @@ const (
// StreamRateLimit is a reason for discarding lines when the streams own rate limit is hit
// rather than the overall ingestion rate limit.
StreamRateLimit = "per_stream_rate_limit"
OutOfOrder = "out_of_order"
TooFarBehind = "too_far_behind"
// OutOfOrder is a reason for discarding lines when Loki doesn't accept out
// of order log lines (parameter `-ingester.unordered-writes` is set to
// `false`) and the lines in question are older than the newest line in the
// stream.
OutOfOrder = "out_of_order"
// TooFarBehind is a reason for discarding lines when Loki accepts
// unordered ingest (parameter `-ingester.unordered-writes` is set to
// `true`, which is the default) and the lines in question are older than
// half of `-ingester.max-chunk-age` compared to the newest line in the
// stream.
TooFarBehind = "too_far_behind"
// GreaterThanMaxSampleAge is a reason for discarding log lines which are older than the current time - `reject_old_samples_max_age`
GreaterThanMaxSampleAge = "greater_than_max_sample_age"
GreaterThanMaxSampleAgeErrorMsg = "entry for stream '%s' has timestamp too old: %v, oldest acceptable timestamp is: %v"
Expand Down

0 comments on commit c6e116a

Please sign in to comment.