Skip to content

Conversation

@daniel-sanche
Copy link
Contributor

@daniel-sanche daniel-sanche commented Aug 11, 2025

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

@daniel-sanche daniel-sanche changed the title [DRAFT] feat: added client side metric instrumentation to data client [DRAFT] feat: added client side metric instrumentation to basic rpcs Jan 15, 2026
@daniel-sanche daniel-sanche changed the title [DRAFT] feat: added client side metric instrumentation to basic rpcs feat: added client side metric instrumentation to basic rpcs Jan 15, 2026
@daniel-sanche daniel-sanche marked this pull request as ready for review January 15, 2026 21:13
@daniel-sanche daniel-sanche requested review from a team as code owners January 15, 2026 21:13
@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 15, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 15, 2026
Base automatically changed from csm_1_data_model to main January 22, 2026 01:20
@@ -0,0 +1,943 @@
# Copyright 2024 Google LLC
Copy link
Contributor

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"
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/python-bigtable API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants