* Remove the helper functions for creating errors as they cause unintended value manipulation if the value contains any valid golang printf substitute characters, e.g. %s
* Improve error message for invalid labels, increment metrics for lines dropped for invalid labels.
Body:[]byte("stream '{foo=\"bar\", foo=\"barf%s\"}' has label value too long: 'barf%s'"),// Intentionally construct the string to make sure %s isn't substituted as (MISSING)
// InvalidLabels is a reason for discarding log lines which have labels that cannot be parsed.
InvalidLabels="invalid_labels"
InvalidLabelsErrorMsg="Error parsing labels '%s' with error: %s"
// RateLimited is one of the values for the reason to discard samples.
// Declared here to avoid duplication in ingester and distributor.
RateLimited="rate_limited"
rateLimitErrorMsg="Ingestion rate limit exceeded (limit: %d bytes/sec) while attempting to ingest '%d' lines totaling '%d' bytes, reduce log volume or contact your Loki administrator to see if the limit can be increased"
RateLimited="rate_limited"
RateLimitedErrorMsg="Ingestion rate limit exceeded (limit: %d bytes/sec) while attempting to ingest '%d' lines totaling '%d' bytes, reduce log volume or contact your Loki administrator to see if the limit can be increased"
// LineTooLong is a reason for discarding too long log lines.
LineTooLong="line_too_long"
lineTooLongErrorMsg="Max entry size '%d' bytes exceeded for stream '%s' while adding an entry with length '%d' bytes"
LineTooLongErrorMsg="Max entry size '%d' bytes exceeded for stream '%s' while adding an entry with length '%d' bytes"
// StreamLimit is a reason for discarding lines when we can't create a new stream
// because the limit of active streams has been reached.
StreamLimit="stream_limit"
streamLimitErrorMsg="Maximum active stream limit exceeded, reduce the number of active streams (reduce labels or reduce label values), or contact your Loki administrator to see if the limit can be increased"
StreamLimitErrorMsg="Maximum active stream limit exceeded, reduce the number of active streams (reduce labels or reduce label values), or contact your Loki administrator to see if the limit can be increased"
// GreaterThanMaxSampleAge is a reason for discarding log lines which are older than the current time - `reject_old_samples_max_age`