Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: replace invalid metric tag values with an empty string instead of _ #3176

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

markushi
Copy link
Member

@markushi markushi commented Feb 27, 2024

According to our spec invalid tag values should be replaced with no string.

Tag Values: regex [^\w\d_:/@\.{}\[\]$-]+ with no replacement character.

I cross checked with PHP and JS: both of them also use no replacement character.

Relevant Python PR: getsentry/sentry-python#2773

@jamescrosswell jamescrosswell enabled auto-merge (squash) February 28, 2024 09:24
@jamescrosswell
Copy link
Collaborator

Thanks @markushi !

@jamescrosswell jamescrosswell merged commit 9e76824 into main Feb 28, 2024
19 of 20 checks passed
@jamescrosswell jamescrosswell deleted the fix/metrics-tag-value-normalization branch February 28, 2024 09:26
@bruno-garcia
Copy link
Member

this is higher chance to cause conflict no?

abc&&a
abc*a
abc::::a

all become abca?

@stefanosiano
Copy link
Member

not really, as it became abc_a previously for all 3 cases. Also, this is for tag values only, not keys, so we should be fine

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.

None yet

5 participants