Skip to content

Fix metrics generator panic when write_relabel_configs is set (#6396)… - #6455

Merged
carles-grafana merged 1 commit into
release-v2.10from
backport1-release-v2.10
Feb 16, 2026
Merged

Fix metrics generator panic when write_relabel_configs is set (#6396)…#6455
carles-grafana merged 1 commit into
release-v2.10from
backport1-release-v2.10

Conversation

@carles-grafana

Copy link
Copy Markdown
Contributor

… (#6399)

The Prometheus dependency upgrade from v0.304.2 to v0.307.3 (PR
prometheus/prometheus#16928) moved label name validation from a global
to a per-config NameValidationScheme field on relabel.Config. This field
must be initialized by calling Validate() before use, otherwise
relabeling panics with "Invalid name validation scheme requested: unset".

Tempo constructs RemoteWriteConfig programmatically rather than going
through Prometheus's config.Load() path, so Validate() was never called.

Call RemoteWriteConfig.Validate(model.UTF8Validation) once at startup
in storage.Config.Validate(), which initializes NameValidationScheme on
all write relabel configs before any tenant storage instances are created.

Also fix a pre-existing bug in watchOverrides where cached state was
updated before ApplyConfig succeeded, preventing retries on failure.

What this PR does:

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

…#6399)

The Prometheus dependency upgrade from v0.304.2 to v0.307.3 (PR
  prometheus/prometheus#16928) moved label name validation from a global
  to a per-config NameValidationScheme field on relabel.Config. This field
  must be initialized by calling Validate() before use, otherwise
  relabeling panics with "Invalid name validation scheme requested: unset".

  Tempo constructs RemoteWriteConfig programmatically rather than going
  through Prometheus's config.Load() path, so Validate() was never called.

  Call RemoteWriteConfig.Validate(model.UTF8Validation) once at startup
  in storage.Config.Validate(), which initializes NameValidationScheme on
  all write relabel configs before any tenant storage instances are created.

  Also fix a pre-existing bug in watchOverrides where cached state was
  updated before ApplyConfig succeeded, preventing retries on failure.
@carles-grafana
carles-grafana merged commit e083d01 into release-v2.10 Feb 16, 2026
23 checks passed
@carles-grafana
carles-grafana deleted the backport1-release-v2.10 branch February 16, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants