feat: For client side metrics, record metrics as MUTATE_ROW for single row mutates#1650
Merged
danieljbruce merged 9 commits intomainfrom Aug 1, 2025
Merged
feat: For client side metrics, record metrics as MUTATE_ROW for single row mutates#1650danieljbruce merged 9 commits intomainfrom
danieljbruce merged 9 commits intomainfrom
Conversation
…into 359913994-mutateRowsInternal
daniel-sanche
approved these changes
Jul 31, 2025
daniel-sanche
left a comment
There was a problem hiding this comment.
Looks good, just a couple small comments
| projectId: string, | ||
| requestsHandled: (OnOperationCompleteData | OnAttemptCompleteData)[] = [], | ||
| ) { | ||
| readRowsAssertionCheck( |
There was a problem hiding this comment.
Why readRows? Should this be MetricsAssertionCheck or something?
Contributor
Author
There was a problem hiding this comment.
Yes. This needs to be renamed. Backlogged in https://b.corp.google.com/issues/435655208.
| import {Mutation} from '../mutation'; | ||
| import arrify = require('arrify'); | ||
|
|
||
| export function mutateInternal( |
There was a problem hiding this comment.
this should probably have a comment like getRowsInternal
Contributor
Author
There was a problem hiding this comment.
This should have a comment. Backlogged in https://b.corp.google.com/issues/435655208.
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Aug 11, 2025
🤖 I have created a release *beep* *boop* --- ## [6.3.0](https://togithub.com/googleapis/nodejs-bigtable/compare/v6.2.0...v6.3.0) (2025-08-11) ### Features * Add client side metrics for checkAndMutateRow calls ([#1661](https://togithub.com/googleapis/nodejs-bigtable/issues/1661)) ([c258ea1](https://togithub.com/googleapis/nodejs-bigtable/commit/c258ea1b29203aad3eaaf9cfe64ddabb8c1018bf)) * Add client side metrics for readModifyWriteRow calls ([#1656](https://togithub.com/googleapis/nodejs-bigtable/issues/1656)) ([2129312](https://togithub.com/googleapis/nodejs-bigtable/commit/2129312401bf9f5b8e51b13ac576cb765de401df)) * Client side metrics support for mutateRows ([#1638](https://togithub.com/googleapis/nodejs-bigtable/issues/1638)) ([7601e4d](https://togithub.com/googleapis/nodejs-bigtable/commit/7601e4da115ff6a5da411cc857917b579c70ced7)) * Collect client side metrics for sampleRowKeys calls ([#1660](https://togithub.com/googleapis/nodejs-bigtable/issues/1660)) ([6ed98fa](https://togithub.com/googleapis/nodejs-bigtable/commit/6ed98faefe446e67f83fd5394aae30374fd3ec3a)) * For client side metrics, record metrics as MUTATE_ROW for single row mutates ([#1650](https://togithub.com/googleapis/nodejs-bigtable/issues/1650)) ([f190a8c](https://togithub.com/googleapis/nodejs-bigtable/commit/f190a8c322498ddfbe73406759a43a268c16bdc4)) * Record ReadRows application latencies for client side metrics ([#1647](https://togithub.com/googleapis/nodejs-bigtable/issues/1647)) ([8af801b](https://togithub.com/googleapis/nodejs-bigtable/commit/8af801b3ecd7ff5e30e6c8cc67bd4123bdf34ee9)) ### Bug Fixes * FirstResponseLatencies should only be collected for readRows calls ([#1658](https://togithub.com/googleapis/nodejs-bigtable/issues/1658)) ([99cf5a6](https://togithub.com/googleapis/nodejs-bigtable/commit/99cf5a6010249ed0eedd88f23b2d32cacb106c07)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Currently when a user calls row.save then client side metrics for those calls will get saved for the MUTATE_ROWS method. We want metrics for these calls to get saved for the MUTATE_ROW method so this PR provides the changes to make that happen.
Impact
Correctly records client side metrics for single point mutateRows calls.
Testing
For each test that applies to MutateRows and ReadRows there is now a corresponding test for mutating a single row.
Additional Information
We didn't want to change the table.mutate interface because that would affect users so we pull table.mutate functionality into a helper function and table.mutate as well as row.save call the helper function.