Error Compatibility Coverage
Generated by conformance/scripts/error_registry.py from the recorded answers of a real Loki, the error-layer gates and the registry. Do not edit by hand.
The answers are those of Grafana Loki 3.7.10, recorded over HTTP on 2026-11-18. Every comparable row is replayed against the proxy by TestLokiErrorAnswersReplay (status, Content-Type, X-Content-Type-Options and body, byte for byte), and a live Loki is asked one representative row of every route, error kind and message by TestCompat_ErrorAnswersLikeLoki on the end-to-end stack. Rows the proxy still answers differently are listed in conformance/registry/error-layer-known-differences.json; that list may only shrink, and the replay test holds it equal to what the proxy really answers, which is what makes the percentages below measured and not declared.
Scores​
| Score | Value | Meaning |
|---|---|---|
| Errors that match Loki | 97.2% (241/248) | recorded Loki answers the proxy reproduces exactly, of the rows that can be compared |
| Matrix coverage | 58.9% (73/124) | route x error kind cells with a recorded or documented Loki answer, a unit gate and an end-to-end comparison |
| Cells that match | 101/124 | cells where every comparable row matches and no known leak remains |
| Messages recorded | 36/48 | typed Loki messages (internal/lokierr) with at least one recorded answer; the rest have a documented reason |
141 recorded rows are not comparable (the recorded Loki ran with authentication disabled, or its answer depends on its own configuration) and are replayed but not counted.
Matrix​
Each cell shows whether the proxy matches (match or differs), the matching and comparable recorded rows, and the checks that cover it: U the proxy unit replay or error-layer gate, E the end-to-end comparison with Loki. gate means the answer is Loki's documented one for a failure that cannot be recorded for one request, held by the error-layer gate.
| Route | Parameters | LogQL syntax | LogQL validation | Limits | Backend failure | Methods and routing | Tenant | Cancel and deadline |
|---|---|---|---|---|---|---|---|---|
alerts | match gate U | match gate U | gap | gap | match gate U | |||
detected_field_values | match 4/4 UE | match 2/2 UE | match 2/2 UE | match 1/1 UE | match gate U | match 1/1 UE | gap | match gate U |
detected_fields | match 7/7 UE | match 2/2 UE | match 2/2 UE | match 1/1 UE | match gate U | match 5/5 UE | gap | match gate U |
detected_labels | match 1/1 UE | match 1/1 UE | match 3/3 UE | match 1/1 UE | match gate U | match 5/5 UE | gap | match gate U |
format_query | gap | match 2/2 UE | match 5/5 UE | |||||
index_stats | match 3/3 UE | match 2/2 UE | match 2/2 UE | match 1/1 UE | match gate U | match 5/5 UE | gap | match gate U |
index_volume | match 6/6 UE | match 2/2 UE | match 2/2 UE | match 1/1 UE | match gate U | match 5/5 UE | gap | match gate U |
index_volume_range | match 9/9 UE | match 2/2 UE | match 2/2 UE | match gate UE | match gate U | match 1/1 UE | gap | match gate U |
label_values | match 4/4 UE | match 1/1 UE | match 3/3 UE | match 1/1 UE | match gate U | match 2/2 UE | not comparable (6) | match gate U |
labels | match 4/4 UE | match 1/1 UE | match 3/3 UE | match 1/1 UE | match gate UE | match 5/5 UE | not comparable (20) | match gate UE |
patterns | match 5/5 UE | match 2/2 UE | match 5/5 UE | match gate U | match gate U | match 5/5 UE | gap | match gate U |
query | match 4/4 UE | match 2/2 UE | match 8/8 UE | match gate U | match gate U | match 5/5 UE | not comparable (6) | match gate U |
query_range | match 16/16 UE | match 2/2 UE | differs 10/11 UE | match gate UE | match gate UE | match 5/5 UE | not comparable (20) | match gate UE |
rules | match gate U | match gate U | gap | gap | match gate U | |||
series | match 2/2 UE | match 2/2 UE | match 1/1 UE | match 1/1 UE | match gate U | match 5/5 UE | not comparable (6) | match gate U |
tail | match 4/4 UE | match 2/2 UE | match 1/1 UE | match gate U | match gate U | match 5/5 UE | gap | match gate U |
tail_upgrade | match 4/4 UE | match 2/2 UE | gap | differs 1/2 UE | not comparable (2) | |||
| other routes (rules views, push, delete, shards, exemplars, aliases) | differs 6/11 UE | |||||||
| unknown paths | match 23/23 UE |
Error kinds:
- Parameters: A request parameter, URL or form body Loki cannot read or does not accept (start, end, since, step, limit, direction, interval, delay_for, aggregateBy, URL escapes, oversize bodies).
- LogQL syntax: A query Loki cannot parse: empty, unterminated, bad tokens.
- LogQL validation: A query that parses but Loki rejects while checking it: matcher rules, stage compile errors, wrong query type for the route, aggregation and function rules.
- Limits: A request over a limit Loki enforces: query length, lookback, series, resolution.
- Backend failure: The storage behind the proxy fails or answers something the proxy cannot use: Loki answers 500, or its queue-full 429, in its own words.
- Methods and routing: A path Loki's router does not know, a method a route does not serve, a tail request that is no websocket upgrade.
- Tenant: A tenant header Loki or the proxy rejects.
- Cancel and deadline: The client goes away (499) or the request runs out of time (504).
Order of Loki's checks​
- request decoding: The URL and form body are decoded first. Messages:
post-too-large,url-escape,url-semicolon. - parameters: Parameters are read next, in the order end, start, limit, step and direction; an end not after the start and the 11,000-point resolution check come before the query is parsed. Messages:
aggregate-by,delay-for,delete-end-in-future,delete-max-interval-invalid,delete-max-interval-too-long,delete-query-invalid,delete-query-not-set,delete-start-not-before-end,delete-start-not-set,delete-time-invalid,direction,end-before-start,interval-negative,limit-not-positive,number,param-duration,param-number,step-duration,step-not-positive,step-overflow,step-too-many-points. - logql syntax: The query text is parsed; a syntax error is answered before the query-length limit on query_range, and on tail before the parameters. Messages:
parse,parse-input-size. - limits: The query-length limit follows the syntax check on query_range and comes before it on the metadata routes. Messages:
limit-lookback,limit-plan-time,limit-query-complexity,limit-query-length. - logql validation: Checks of a query that parsed (stage compilation, matcher rules, query type) come last. Messages:
instant-log-query,only-label-matchers,only-log-selector.
The order was observed by sending 33 requests that carry two errors each to a real Loki (internal/lokierr/testdata/loki_check_order.jsonl) and is held in each message item.
Messages​
| Message | Status | Kind | Recorded rows | Match | State | Unit | End to end |
|---|---|---|---|---|---|---|---|
msg-aggregate-by | 400 | param | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-backend-failed | 500 | backend_failed | 0 | - | documented | TestErrorLayer_NoVictoriaLogsLeak | - |
msg-canceled | 499 | canceled | 0 | - | documented | TestErrorLayer_NoVictoriaLogsLeak, TestErrorLayer_WindowRetryCancelDeadline | - |
msg-deadline | 504 | deadline | 0 | - | documented | TestErrorLayer_NoVictoriaLogsLeak, TestErrorLayer_WindowRetryCancelDeadline | - |
msg-delay-for | 400 | param | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-delete-end-in-future | 400 | param | 1 | - | recorded-not-comparable | - | - |
msg-delete-max-interval-invalid | 400 | param | 8 | - | recorded-not-comparable | - | - |
msg-delete-max-interval-too-long | 400 | param | 1 | - | recorded-not-comparable | - | - |
msg-delete-query-invalid | 400 | param | 4 | - | recorded-not-comparable | - | - |
msg-delete-query-not-set | 400 | param | 2 | - | recorded-not-comparable | - | - |
msg-delete-request-not-found | 404 | route | 4 | - | recorded-not-comparable | - | - |
msg-delete-start-not-before-end | 400 | param | 9 | - | recorded-not-comparable | - | - |
msg-delete-start-not-set | 400 | param | 1 | - | recorded-not-comparable | - | - |
msg-delete-time-invalid | 400 | param | 15 | - | recorded-not-comparable | - | - |
msg-direction | 400 | param | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-end-before-start | 400 | param | 5 | 5/5 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-instant-log-query | 400 | param | 8 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-internal | 500 | internal | 0 | - | documented | TestErrorLayer_NoVictoriaLogsLeak | - |
msg-interval-negative | 400 | param | 1 | 1/1 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-limit-index-series | 500 | limit | 1 | - | recorded-not-comparable | - | - |
msg-limit-lookback | 400 | limit | 3 | - | recorded-not-comparable | - | - |
msg-limit-not-positive | 400 | param | 8 | 8/8 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-limit-plan-time | 400 | limit | 0 | - | documented | TestPlanBudgetStopsValidationAndStoresNothing, TestPlanBudgetStopsTheLowering, TestPlanBudgetBeforeTheFirstBackendCall, TestPlanBudgetTripIsNotHeldAfterTheFlight | - |
msg-limit-query-complexity | 400 | limit | 0 | - | documented | TestQueryComplexityLimitsRejectOnlyWhenLowered, TestQueryComplexityDerivedDefaultsNeverTrip | - |
msg-limit-query-length | 400 | limit | 9 | 8/8 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-limit-reached | 400 | limit | 0 | - | documented | TestLimitAnswersAreLokisTextAndLogTheFlag, TestErrorLayer_NoVictoriaLogsLeak | - |
msg-limit-response-size | 500 | limit | 0 | - | documented | TestLimitAnswersAreLokisTextAndLogTheFlag, TestErrorLayer_NoVictoriaLogsLeak | - |
msg-limit-series | 400 | limit | 0 | - | documented | TestErrorLayer_LokiLimitTexts | - |
msg-method-not-allowed | 405 | route | 62 | 61/61 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-no-org-id | 401 | route | 0 | - | documented | TestTenantAuth_AnswersLikeLoki, TestDeleteAuth_TokenGatesTheHandler | - |
msg-not-found | 404 | route | 21 | 21/21 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-number | 400 | param | 8 | 8/8 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-only-label-matchers | 400 | param | 11 | 11/11 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-only-log-selector | 400 | param | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-param-duration | 400 | param | 9 | 9/9 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-param-number | 400 | param | 14 | 14/14 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-parse | 400 | parse | 61 | 58/61 | differs | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-parse-input-size | 400 | parse | 1 | 1/1 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-post-too-large | 400 | form | 1 | 1/1 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-queue-full | 429 | queue_full | 0 | - | documented | TestErrorLayer_NoVictoriaLogsLeak | - |
msg-step-duration | 400 | param | 4 | 4/4 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-step-not-positive | 400 | param | 4 | 4/4 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-step-overflow | 400 | param | 1 | 1/1 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-step-too-many-points | 400 | param | 3 | 3/3 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-tail-not-websocket | 400 | route | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
unmapped-evaluator-unexpected-expr | 500 | unmapped | 1 | 0/1 | differs | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
unmapped-index-shards-target-bytes | 400 | unmapped | 1 | 0/1 | differs | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
unmapped-path-cleaning-redirect | 301 | unmapped | 7 | 7/7 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
unmapped-push-snappy-corrupt | 400 | unmapped | 1 | 0/1 | differs | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
unmapped-ruler-local-store | 400 | unmapped | 4 | - | recorded-not-comparable | - | - |
unmapped-shard-aggregations-disabled | 500 | unmapped | 1 | - | recorded-not-comparable | - | - |
unmapped-upgrade-required | 426 | unmapped | 1 | 0/1 | differs | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-url-escape | 400 | form | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-url-semicolon | 400 | form | 2 | 2/2 | matches | TestLokiErrorAnswersReplay | TestCompat_ErrorAnswersLikeLoki |
msg-write-not-supported | 405 | route | 0 | - | documented | TestLokiPushRoute | - |
A message with no recorded row carries the reason in its registry item (conformance/registry/loki/errors/).
Ratchets​
error-layer-known-differences.json: the rows that still differ; its ceiling may only fall.error-layer-known-leaks.json: the backend-failure cells that still leak; its ceiling may only fall.conformance/registry/baseline.json: the two scores above may not drop, andscripts/ci/check_conformance.pyfails when a message has no item, an item has neither a recorded answer nor a documented reason, or a matrix cell loses a check it had on the base branch. A re-recording that adds rows can lower a percentage without any regression: the recorder (test/errorrecord) only rewrites answers of existing rows.- The pull request quality report shows both scores for the base and the pull request and fails on a drop.
Regenerating​
python3 conformance/scripts/error_registry.py # items, matrix, scores and this page
LVP_LOKI_ERROR_ANSWERS_UPDATE=1 go test ./internal/proxy -run TestLokiErrorAnswersReplay # after a proxy change, the known differences
go run ./test/errorrecord -loki http://localhost:13101 # re-record Loki's answers from a running stack