fix: reload span_name_sanitization overrides during runtime - #6435
Merged
electron0zero merged 5 commits intoFeb 11, 2026
Merged
Conversation
…time before this fix, we were just loading the MetricsGeneratorSpanNameSanitization of the overrides at startup if the overrides were updated (which they can without restart), we won't reload them and the MetricsGeneratorSpanNameSanitization config change in the overrides won't take effact without restart
electron0zero
requested review from
carles-grafana,
ie-pham,
javiermolinar,
mapno,
mattdurham,
mdisibio,
oleg-kozlyuk-grafana,
ruslan-mikhailov,
stoewer,
yvrhdn and
zalegrala
as code owners
February 11, 2026 18:14
electron0zero
commented
Feb 11, 2026
| if sanitizationMode := overrides.MetricsGeneratorSpanNameSanitization(tenant); sanitizationMode != SpanNameSanitizationDisabled { | ||
| sanitizer = NewDrainSanitizer(tenant, sanitizationMode == SpanNameSanitizationDryRun, cfg.StaleDuration) | ||
| } | ||
| sanitizer := NewDrainSanitizer(tenant, overrides.MetricsGeneratorSpanNameSanitization, cfg.StaleDuration) |
Member
Author
There was a problem hiding this comment.
this is following the same pattern we follow in the NewTracker in the modules/distributor/usage/tracker.go
another way we can do it pass overrides down and call MetricsGeneratorSpanNameSanitization instead of taking func as argument.
Logiraptor
approved these changes
Feb 11, 2026
ie-pham
approved these changes
Feb 11, 2026
electron0zero
enabled auto-merge (squash)
February 11, 2026 19:18
mattdurham
pushed a commit
to mattdurham/tempo
that referenced
this pull request
Jun 18, 2026
…6435) * fix: reload MetricsGeneratorSpanNameSanitization overrides during runtime before this fix, we were just loading the MetricsGeneratorSpanNameSanitization of the overrides at startup if the overrides were updated (which they can without restart), we won't reload them and the MetricsGeneratorSpanNameSanitization config change in the overrides won't take effact without restart * Add CHANGELOG.md * cleanup noopSanitizer because we don't need it anymore * Add a test to ensure toggle works * replace assert with require
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
Before this fix, we were just loading the MetricsGeneratorSpanNameSanitization overrides just at startup, and never checking or reloading after that.
If the overrides were updated (which they can without restart), we won't reload them and the MetricsGeneratorSpanNameSanitization config change in the overrides won't take effact without restart
we missed this detail and the reload in the #6098, so fixing it now in a follow up PR
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]