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.
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
Trace Normalizer: add service + env tag normalization #106
Trace Normalizer: add service + env tag normalization #106
Changes from 14 commits
ab26e7b
38d0c62
4058d5c
2eb2940
0ae59a7
4236bd5
aca86be
263e106
659c309
0e35bbd
12c80c2
7c3a31d
924c6d3
be94c7a
8b1f91a
8be8691
912f026
0c8de51
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to think about here, is that is_alphabetic uses the unicode definition of alphabetic characters, so includes characters from all alphabets, not just ascii. Whereas this helper function used elsewhere is only checking for ascii alpha characters.
https://github.com/DataDog/libdatadog/blob/main/trace-normalization/src/normalize_utils.rs#L162
Our documentation only mentions alphanumerics:
What does the go trace agent do here? We should try to be consistent in which method we use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to mirror exactly what the go tag normalizer does, which:
isNormalizedASCIITag
as a fast path (here)Here is the go tag normalizer
The helper function you linked is used in
normalize_metric_names
, who's go counterpart normMetricNameParse also just uses the ASCII checkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can pull the iterator out, and then iterate manually using
.next()
instead this juggling. Then instead of calling.nth(i)
to get the 'current' value, it will just be there. And 'next' can be obtained by calling.next()
instead of.nth(i + 1)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same deal here, also, are only lower case characters valid as a start character?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thats correct (corresponding function in the go agent normalizer)