On the OTLP metrics push path, tenants can only control metric-name translation (escaping/suffixes) via global/tenant config. We need experimental, opt-in per-request overrides so a client can control translation for a single push without changing tenant defaults.
When `-api.otlp-translation-headers-enabled` is enabled (default off; expose like other API header feature flags), honor these OTLP push headers:
- `X-Mimir-OTLP-AddSuffixes` (`true`/`false`): toggle suffix addition for the request while preserving the tenant strategy’s escaping mode (e.g. UnderscoreEscapingWithSuffixes ↔ UnderscoreEscapingWithoutSuffixes, NoUTF8EscapingWithSuffixes ↔ NoTranslation).
- `X-Mimir-OTLP-TranslationStrategy`: fully override strategy for the request. Accepted values: `UnderscoreEscapingWithSuffixes`, `UnderscoreEscapingWithoutSuffixes`, `NoUTF8EscapingWithSuffixes`, `NoTranslation`. If both headers are set, the strategy header wins and the suffixes header is ignored.
Invalid header values must return HTTP 400. If the effective strategy from the headers yields UTF-8 metric names (no underscore escaping), that request’s name validation scheme must be upgraded to UTF-8 for downstream validation. If the flag is off, ignore the headers and keep existing behavior.
Interface contract — the change must expose exactly this surface:
CLI/YAML flag `-api.otlp-translation-headers-enabled` / `otlp_translation_headers_enabled` (bool, default false, experimental). Headers `X-Mimir-OTLP-AddSuffixes` and `X-Mimir-OTLP-TranslationStrategy` on the OTLP push path. `OTLPHandler` must accept a bool enabling these headers, wired from API config.
Work only inside this repository checkout. Make the code change the task
describes, keeping the diff focused — no drive-by refactors.
When you are done, leave your changes committed or in the working tree;
they are collected automatically.
Stay on this snapshot checkout (`task/ycb_mimir_c44a858a91d43`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan.
Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.
Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
Reference diff
The task commit's diff against its first parent — the judge's comparison target.