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
feat: add metrics for provider #407
Conversation
This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days. |
This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days. |
This PR is stale because it has been open 14 days with no activity. Please comment or this will be closed in 7 days. |
26c35ea
to
0c2f195
Compare
0cecca0
to
e28e704
Compare
/azp run pr-e2e-azure |
Azure Pipelines successfully started running 1 pipeline(s). |
cmd/main.go
Outdated
@@ -106,9 +112,10 @@ func main() { | |||
grpc.UnaryInterceptor(utils.LogGRPC), |
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.
Can we add metrics for grpc as well?
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.
Added metrics for gRPC too. The gRPC request has a different set of attributes compared to the keyvault metric, so I've kept that as a separate metric. The keyvault metric is what will be useful for users to monitor the plugin is functioning correctly.
resp, err := handler(ctx, req) | ||
s, _ := status.FromError(err) | ||
klog.V(5).InfoS("response", "method", info.FullMethod, "duration", time.Since(start).String(), "code", s.Code().String(), "message", s.Message()) | ||
reporter.ReportGRPCRequest(ctx, time.Since(start).Seconds(), info.FullMethod, s.Code().String(), s.Message()) |
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.
Using the full method for metric to track the proto version for the RPC call
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com> chore: update to latest version of otel Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
Signed-off-by: Anish Ramasekar anish.ramasekar@gmail.com
Reason for Change:
Requirements
Issue Fixed:
fixes #400
Does this change contain code from or inspired by another project?
If "Yes," did you notify that project's maintainers and provide attribution?
Special Notes for Reviewers: