-
Notifications
You must be signed in to change notification settings - Fork 61
feat: added client side metric instrumentation to basic rpcs #1188
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Mattie Fu <mattiefu@google.com>
| @@ -0,0 +1,943 @@ | |||
| # Copyright 2024 Google LLC | |||
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.
nit: we should update these to 2026 :)
| for i in range(num_retryable): | ||
| attempt = handler.completed_attempts[i] | ||
| assert isinstance(attempt, CompletedAttemptMetric) | ||
| assert attempt.end_status.name == "ABORTED" |
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.
Not related to the metrics, but ABORTED shouldn't be retried for mutate row?
| assert attempt.end_status.value[0] == 0 | ||
| assert attempt.backoff_before_attempt_ns == 0 | ||
| assert ( | ||
| attempt.gfe_latency_ns > 0 and attempt.gfe_latency_ns < attempt.duration_ns |
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.
how is gfe_latency_ns injected to the header? this should be a number instead of a range since we can set it in the header.
| final_attempt = handler.completed_attempts[num_retryable] | ||
| assert isinstance(final_attempt, CompletedAttemptMetric) | ||
| assert final_attempt.end_status.name == "PERMISSION_DENIED" | ||
| assert final_attempt.gfe_latency_ns is None |
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 as long as the request gets to the server, gfe_latency_ns should not be none. So this is probably related to the test setup ?
This PR builds off of #1187 to add instrumentation to basic data client rpcs (check_and_mutate, read_modify_write, sample_row_keys, mutate_row)
Metrics are not currently being exported anywhere, just collected and dropped. A future PR will add a GCP exporter to the system