-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Move pkg/normalizer to collector #6877
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
Conversation
Signed-off-by: danish9039 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6877 +/- ##
=======================================
Coverage 96.13% 96.13%
=======================================
Files 341 341
Lines 19738 19738
=======================================
Hits 18975 18975
Misses 577 577
Partials 186 186
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cmd/collector/app/metrics.go
Outdated
@@ -327,13 +327,15 @@ func (m *traceCountsBySvc) countByServiceName(serviceName string, isDebug bool, | |||
// an alert should be raised to investigate what's causing so many unique | |||
// service names. | |||
func (m *spanCountsBySvc) countByServiceName(serviceName string, isDebug bool) { | |||
serviceName = normalizer.ServiceName(serviceName) | |||
m.lock.Lock() |
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.
This is not a required change for this pr and makes the code slower
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 have reverted these changes
cmd/collector/app/metrics.go
Outdated
@@ -363,3 +364,42 @@ func (m *traceCountsBySvc) buildKey(serviceName, samplerType string) string { | |||
m.stringBuilderPool.Put(keyBuilder) | |||
return key | |||
} | |||
func normalizeServiceName(serviceName string) string { |
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.
Move the files, don't inline. We don't need xtra diffs.
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.
done
Signed-off-by: danish9039 <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
7152b42
<!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - part of jaegertracing#6869 ## Description of the changes - inline the `/pkg/normalizer `package into the metrics.go file where it's used. ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: danish9039 <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
<!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - part of jaegertracing#6869 ## Description of the changes - inline the `/pkg/normalizer `package into the metrics.go file where it's used. ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: danish9039 <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: amol-verma-allen <[email protected]>
Which problem is this PR solving?
Description of the changes
/pkg/normalizer
package into the metrics.go file where it's used.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test