GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: added client side metric instrumentation to basic rpcs by daniel-sanche · Pull Request #1188 · googleapis/python-bigtable

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@daniel-sanche

@daniel-sanche daniel-sanche commented Aug 11, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
daniel-sanche and others added 30 commits July 25, 2025 16:12
@daniel-sanche
use replaceable channel wrapper
d2175f1
@daniel-sanche
got unit tests working
5e107fc
@daniel-sanche
put back in cache invalidation
c4a97e1
@daniel-sanche
added wrapped multicallables to avoid cache invalidation
e71b1d5
@daniel-sanche
added crosssync, moved close logic back to client
b81a9be
@daniel-sanche
generated sync code
a1dffb5
@daniel-sanche
got tests running
e3ec02b
@daniel-sanche
fixed tests
4e13783
@daniel-sanche
remove extra wrapper; added invalidate_stubs helper
7d90a04
@daniel-sanche
fixed lint
26cd601
@daniel-sanche
fixed lint
375332f
@daniel-sanche
renamed replaceablechannel to swappablechannel
428d75a
@daniel-sanche
added tests
4b39bc5
@daniel-sanche
added docstrings
3f090c2
@daniel-sanche
Merge branch 'main' into refactor_refresh
883ceab
@daniel-sanche
initial commit
04c762a
@daniel-sanche
added back interceptor
29dff4d
@daniel-sanche
added metrics to client
e4f8238
@daniel-sanche
fixed lint
fcb062e
@daniel-sanche
Merge branch 'refactor_refresh' into csm_1_data_model
ac8dbe4
@daniel-sanche
set up channel interceptions
d155f8a
@daniel-sanche
added TrackedBackoffGenerator
9fece96
@daniel-sanche
fixed lint
aec2577
@daniel-sanche
fixed import
ec4e847
@daniel-sanche
added stdout handler to test
0d93889
@daniel-sanche
instrumented check_and_mutate
a580fa2
@daniel-sanche
added instrumentation to read_modify_write
bc13b46
@daniel-sanche
added instrumentation to sample_row_keys
6c3be46
@daniel-sanche
instrumented mutate_row
ca38615
@daniel-sanche
added instrumentation to mutate_rows
eb82ae9
daniel-sanche added 4 commits January 15, 2026 12:18
@daniel-sanche
updated state diagram
78c640b
@daniel-sanche
Merge branch 'csm_1_data_model' into csm_2_instrumentation
5b8c22b
@daniel-sanche
removed read_rows and mutate_rows instrumentation
d3a9013
@daniel-sanche
reverted unneeded files
83c806a
@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
fixed tests
bacc505
@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 January 15, 2026 21:13
@blunderbuss-gcf blunderbuss-gcf Bot assigned mutianf Jan 15, 2026
@daniel-sanche
fixed lint
ced3ee3
@daniel-sanche daniel-sanche mentioned this pull request Jan 15, 2026
[DRAFT] feat: added client side metric instrumentation to read_rows and mutate_rows #1256
Closed
@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
@daniel-sanche
Merge branch 'main' into csm_2_instrumentation
700ebe3
mutianf
mutianf reviewed Jan 28, 2026
View reviewed changes
Comment thread tests/system/data/test_metrics_async.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/system/data/test_metrics_async.py
for i in range(num_retryable):
attempt = handler.completed_attempts[i]
assert isinstance(attempt, CompletedAttemptMetric)
assert attempt.end_status.name == "ABORTED"

@mutianf mutianf Jan 28, 2026

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daniel-sanche daniel-sanche Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

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.

It doesn't look like it, and it's not listed as a retryable error in the service config. Is it in Java? It would be easy to add here

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/system/data/test_metrics_async.py
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

@mutianf mutianf Jan 28, 2026

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daniel-sanche daniel-sanche Jan 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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 this is testing against the true backend response here, not a mocked value

These are system tests, so I was trying to limit the amount of mocking used here, although some other tests do inject fake exceptions into the stream to test retry logic

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/system/data/test_metrics_async.py
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

@mutianf mutianf Jan 28, 2026

Copy link
Copy Markdown
Contributor

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 ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daniel-sanche daniel-sanche Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

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.

It looks like this test is testing the case where we have multiple transient retryable errors, before encountering a terminal error. For the errors, I'm using a custom error_injector class, to control which errors are triggered in which sequence. So this test wouldn't ever be reaching the real backend

It's been a while since I looked at this, but I remember having issues fully controlling the backend errors in the way I needed for some of these tests, which is why I used the error_injector. There are other tests in this file that send unauthorized requests to trigger a real backend failure though.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
daniel-sanche added 4 commits January 28, 2026 13:24
@daniel-sanche
updated year
9d3588a
@daniel-sanche
skip unsupported emulator tests
4a2626a
@daniel-sanche
fixed lint
2dd813f
@daniel-sanche
added additional test skips
965e0e5
@parthea

parthea commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Closing stale PRs to prepare for the code migration to google-cloud-python

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea parthea closed this Feb 23, 2026
@daniel-sanche daniel-sanche reopened this Feb 25, 2026
@daniel-sanche

daniel-sanche commented Feb 25, 2026

Copy link
Copy Markdown
Contributor Author

Re-opening to see if we can get this in before the migration. If not, we can close and re-start this in the monorepo

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea

parthea commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

As per offline discussion with @daniel-sanche, closing PR to prepare for the code migration to google-cloud-python

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@parthea parthea closed this Feb 26, 2026
@daniel-sanche daniel-sanche mentioned this pull request Apr 17, 2026
feat(bigtable): add client side metric instrumentation to basic rpcs googleapis/google-cloud-python#16712
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@mutianf mutianf mutianf left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mutianf mutianf

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@daniel-sanche @parthea @mutianf @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.