-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[spm] GetErrorRates implementation #7298
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
[spm] GetErrorRates implementation #7298
Conversation
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7298 +/- ##
==========================================
- Coverage 96.15% 96.15% -0.01%
==========================================
Files 376 377 +1
Lines 22747 22863 +116
==========================================
+ Hits 21873 21984 +111
- Misses 659 662 +3
- Partials 215 217 +2
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:
|
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Hi @yurishkuro, this pr is ready for your review! Thank you |
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
for i, label := range labels { | ||
keys[i] = fmt.Sprintf("%s=%s", label.Name, label.Value) | ||
} | ||
return strings.Join(keys, ",") |
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 about the order of labels? "a=x,b=y" != "b=y,a=x"
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.
Thanks for your feedback! For the sake of correctness, we should do it. I think we can handle this case by first sorting the array
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.
Solved at be7612d
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.
ok, so the code may be technically correct now, but isn't it your code that creates metrics family with labels in the first place? Is it possible to have more than one label? If not, do you need to concatenate them into a string rather than just looking up the service name?
Also, why are only service names used as labels, isn't there a use case where operation is also a label?
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.
Hi @yurishkuro, Yes Jaeger control the label inside to_domain.go, this is what I have been thinking about in the first place, we do not actually need to sort it because it's always the same order (but for safety, this is good and it's not that computationally expensive (just several labels is fast)). Yes, it's possible to have more than one label (e.g service_name, operation). Because there are more than one label, we can't look up by just the service_name.
No not only service_name is used as label, operation is also used as a label, check this:
func toDomainLabels(key string) []*metrics.Label { |
// toDomainLabels converts the bucket key to Jaeger metric labels.
func toDomainLabels(key string) []*metrics.Label {
return []*metrics.Label{
{
Name: "operation",
Value: key,
},
}
}
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Hi @yurishkuro, the pull request is ready for your review ! Thank for you support |
labelKey := getLabelKey(errorMetric.Labels) | ||
callMetric, exists := callMetricsByLabels[labelKey] | ||
if !exists { | ||
continue // Skip if no matching call metric. |
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.
don't you need to generate a NaN data point?
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 think that this is very important, that the e2e tests need to verify the labels, without it we may fail the e2e test
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.
Hi @yurishkuro, this is solved at #7303
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.
going to merge, but please check the comments
368bff8
Which problem is this PR solving?
Description of the changes
How was this change tested?
Proof of the feature
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test