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
[v2] Implement sanitizers to operate on OTLP data #5551
[v2] Implement sanitizers to operate on OTLP data #5551
Changes from 14 commits
32db390
7af6144
add2f2b
c0a30c3
fd89e01
c2841d8
53ae6bd
0ef93f3
7997c1b
48a5229
d029e7b
cdd2633
2c6fe5c
7f0e9cc
1d46f5d
45ee0aa
3464d25
786a279
28def9c
75026c0
dab72f9
1062ba0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 19 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go#L18-L19
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.
better to import semantic conventions and use a constant from there
Check warning on line 29 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go#L23-L29
Check warning on line 32 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go#L31-L32
Check warning on line 34 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go#L34
Check warning on line 37 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/empty_service_name_sanitizer.go#L37
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.
you need to call this from the exporter
Check warning on line 17 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go#L14-L17
Check warning on line 25 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go#L23-L25
Check warning on line 29 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go#L27-L29
Check warning on line 31 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/sanitizer.go#L31
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.
please add a test
Check warning on line 22 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L21-L22
Check warning on line 34 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L26-L34
Check warning on line 40 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L36-L40
Check warning on line 50 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L44-L50
Check warning on line 53 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L53
Check warning on line 57 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L57
Check warning on line 62 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L61-L62
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.
what happens to
attributes.Range
if you add attributes in the lambda function?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.
Modifying the map while iterating over it can lead to undefined behavior. Better, we should first collect the keys and values that need to be sanitized and then apply these changes after the iteration is complete.
Check warning on line 69 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L64-L69
Check warning on line 74 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L71-L74
Check warning on line 76 in cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go
Codecov / codecov/patch
cmd/jaeger/internal/exporters/storageexporter/sanitizer/utf8_sanitizer.go#L76