defaultBlockedIngestionStatusCode=260// 260 is a custom status code to indicate blocked ingestion
)
// Limits describe all the limits for users; can be used to describe global default
@ -222,6 +224,9 @@ type Limits struct {
MaxStructuredMetadataEntriesCountint`yaml:"max_structured_metadata_entries_count" json:"max_structured_metadata_entries_count" doc:"description=Maximum number of structured metadata entries per log line."`
f.Var(&l.MaxStructuredMetadataSize,"limits.max-structured-metadata-size","Maximum size accepted for structured metadata per entry. Default: 64 kb. Any log line exceeding this limit will be discarded. There is no limit when unset or set to 0.")
f.IntVar(&l.MaxStructuredMetadataEntriesCount,"limits.max-structured-metadata-entries-count",defaultMaxStructuredMetadataCount,"Maximum number of structured metadata entries per log line. Default: 128. Any log line exceeding this limit will be discarded. There is no limit when unset or set to 0.")
f.Var(&l.BlockIngestionUntil,"limits.block-ingestion-until","Block ingestion until the configured date. The time should be in RFC3339 format.")
f.IntVar(&l.BlockIngestionStatusCode,"limits.block-ingestion-status-code",defaultBlockedIngestionStatusCode,"HTTP status code to return when ingestion is blocked. If 200, the ingestion will be blocked without returning an error to the client. By Default, a custom status code (260) is returned to the client along with an error message.")
}
// SetGlobalOTLPConfig set GlobalOTLPConfig which is used while unmarshaling per-tenant otlp config to use the default list of resource attributes picked as index labels.
StructuredMetadataTooLargeErrorMsg="stream '%s' has structured metadata too large: '%d' bytes, limit: '%d' bytes. Please see `limits_config.max_structured_metadata_size` or contact your Loki administrator to increase it."
StructuredMetadataTooManyErrorMsg="stream '%s' has too many structured metadata labels: '%d', limit: '%d'. Please see `limits_config.max_structured_metadata_entries_count` or contact your Loki administrator to increase it."
BlockedIngestion="blocked_ingestion"
BlockedIngestionErrorMsg="ingestion blocked for user %s until '%s' with status code '%d'"