-
Notifications
You must be signed in to change notification settings - Fork 78
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
[DONT MERGE] Add logic to get backoff metrics #1666
Conversation
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
[CHATOPS:HELP] ChatOps commands.
|
Codecov Report
@@ Coverage Diff @@
## master #1666 +/- ##
==========================================
- Coverage 31.20% 31.09% -0.12%
==========================================
Files 372 374 +2
Lines 32502 32602 +100
==========================================
- Hits 10142 10136 -6
- Misses 21982 22081 +99
- Partials 378 385 +7
Continue to review full report at Codecov.
|
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
return []metrics.Measurement{}, nil | ||
} | ||
|
||
func (bm *backoffMetrics) MeasurementWithTags(ctx context.Context) (mts []metrics.MeasurementWithTags, err error) { |
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.
🚫 [golangci] reported by reviewdog 🐶
named return "mts" with type "[]metrics.MeasurementWithTags" found (nonamedreturns)
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@@ -31,7 +31,7 @@ import ( | |||
"github.com/vdaas/vald/internal/test/goleak" | |||
) | |||
|
|||
func TestDo(t *testing.T) { | |||
func TestDo_for_race(t *testing.T) { |
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 fixed function name because of CI fails.
The reason why CI fails was because there was a same function in to the same package.
https://github.com/vdaas/vald/blob/master/internal/runner/runner_test.go#L284
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
[WARNING:INTCFG] Changes in |
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
"github.com/vdaas/vald/internal/observability/metrics" | ||
) | ||
|
||
type backoffMetrics struct { |
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.
🚫 [golangci] reported by reviewdog 🐶
fieldalignment: struct with 48 pointer bytes could be 32 (govet)
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
pkg/manager/index/service/indexer.go
Outdated
_, err = idx.client.GetClient().Do(ctx, addr, func(ctx context.Context, conn *grpc.ClientConn, copts ...grpc.CallOption) (_ interface{}, err error) { | ||
return agent.NewAgentClient(conn).SaveIndex(ctx, &payload.Empty{}, copts...) | ||
}) | ||
_, err = idx.client.GetClient().Do(grpc.WithGRPCMethod(ctx, "v1.vald.SaveIndex"), addr, |
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.
_, err = idx.client.GetClient().Do(grpc.WithGRPCMethod(ctx, "v1.vald.SaveIndex"), addr, | |
_, err = idx.client.GetClient().Do(grpc.WithGRPCMethod(ctx, "vald.v1.SaveIndex"), addr, |
_, err = idx.client.GetClient().Do(grpc.WithGRPCMethod(ctx, "v1.vald.SaveIndex"), addr, | |
_, err = idx.client.GetClient().Do(grpc.WithGRPCMethod(ctx, "v1.vald.SaveIndex"), addr, |
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@@ -0,0 +1,82 @@ | |||
// |
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.
🚫 [golangci] reported by reviewdog 🐶
ST1000: package comment should be of the form "Package backoff ..." (stylecheck)
@@ -0,0 +1,35 @@ | |||
// |
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.
🚫 [golangci] reported by reviewdog 🐶
ST1000: package comment should be of the form "Package backoff ..." (stylecheck)
I will close this PR. Because the following PR was merged to master. |
Description:
WHAT
I have added the logic to be able to get backoff metrics.
This allows collection of backoff metrics (retry count) within each RPC request when observability and backoff are enabled
WHY
We are in the process of implementing CircuitBreaker, but first we need to get proper metrics on the backoffs that occur inside RPC requests.
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: