Skip to content

[spanmetrics] Sanitize name in mapped dimensions#3171

Merged
mapno merged 5 commits intografana:mainfrom
mapno:sanitize-dimensions-mapping-name
Nov 23, 2023
Merged

[spanmetrics] Sanitize name in mapped dimensions#3171
mapno merged 5 commits intografana:mainfrom
mapno:sanitize-dimensions-mapping-name

Conversation

@mapno
Copy link
Copy Markdown
Contributor

@mapno mapno commented Nov 23, 2023

What this PR does:

If not sanitized, Prometheus incompatible labels can be sent.

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]

@mapno mapno enabled auto-merge (squash) November 23, 2023 10:52
Comment thread modules/generator/processor/spanmetrics/spanmetrics_test.go Outdated
Copy link
Copy Markdown
Contributor

@yvrhdn yvrhdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Since we are calling the sanitize function at multiple points, I wonder if we should move this into the registry? The registry could do it more centralized and we don't risk forgetting about it in the processors.

@mapno mapno merged commit a0a0ce2 into grafana:main Nov 23, 2023
@mapno mapno deleted the sanitize-dimensions-mapping-name branch November 23, 2023 17:05
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.

3 participants