feat: Enable csm by default#1695
Merged
gcf-merge-on-green[bot] merged 6 commits intomainfrom Aug 21, 2025
Merged
Conversation
danieljbruce
commented
Aug 20, 2025
| : []; | ||
| const handlers = !(options.metricsEnabled === false) | ||
| ? [new GCPMetricsHandler(Object.assign({}, options) as ClientOptions)] | ||
| : []; |
Contributor
Author
There was a problem hiding this comment.
We need to send a copy of the options so that when the handler deletes the apiEndpoint the original options are not affected.
danieljbruce
commented
Aug 20, 2025
| try { | ||
| assert.strictEqual(options, clientOptions); | ||
| assert.deepStrictEqual(options, clientOptions); | ||
| done(); |
Contributor
Author
There was a problem hiding this comment.
Changes in this file now only check to see values are equal because we are passing a copy of the options down now.
danieljbruce
commented
Aug 20, 2025
| const handlers = []; | ||
| bigtable._metricsConfigManager = new ClientSideMetricsConfigManager( | ||
| handlers, | ||
| ); |
Contributor
Author
There was a problem hiding this comment.
The conformance tests must not try to communicate with the metrics dashboard.
mutianf
approved these changes
Aug 21, 2025
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Aug 22, 2025
🤖 I have created a release *beep* *boop* --- ## [6.4.0](https://togithub.com/googleapis/nodejs-bigtable/compare/v6.3.0...v6.4.0) (2025-08-21) ### Features * Enable csm by default ([#1695](https://togithub.com/googleapis/nodejs-bigtable/issues/1695)) ([9744aa3](https://togithub.com/googleapis/nodejs-bigtable/commit/9744aa355e87c2170019c52b58d1045160f19e7c)) * For application latencies timed stream a few cosmetic changes are needed ([#1645](https://togithub.com/googleapis/nodejs-bigtable/issues/1645)) ([75d1a6f](https://togithub.com/googleapis/nodejs-bigtable/commit/75d1a6f5bc8d8cd74214bdf3c9db9d06786f9575)) --- 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
The client side metrics should be enabled by default
Impact
To meet user needs. Get them using client side metrics by default.
Testing
The system tests are already a good smoke test. They will start collecting metrics and they will tell us if there is a problem.
Some conformance tests fail due to connection issues when you turn the metrics on though so conformance test changes are necessary. We have to make it so that they don't try to send metrics due to connection issues with the test proxy environment. Here were the failures below:
=== RUN TestReadRows_Generic_CloseClient
(node:4514) MetadataLookupWarning: received unexpected error = All promises were rejected code = UNKNOWN
[Servr log] 2025/08/20 20:02:20 There is 2s sleep on the server side
[Servr log] 2025/08/20 20:02:20 There is 2s sleep on the server side
[Servr log] 2025/08/20 20:02:20 There is 2s sleep on the server side
(node:4514) MetadataLookupWarning: received unexpected error = All promises were rejected code = UNKNOWN
/home/runner/work/nodejs-bigtable/nodejs-bigtable/node_modules/google-gax/node_modules/google-auth-library/build/src/auth/googleauth.js:284
throw new Error(exports.GoogleAuthExceptionMessages.NO_ADC_FOUND);
^
Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
at GoogleAuth.getApplicationDefaultAsync (/home/runner/work/nodejs-bigtable/nodejs-bigtable/node_modules/google-gax/node_modules/google-auth-library/build/src/auth/googleauth.js:284:15)
at async #determineClient (/home/runner/work/nodejs-bigtable/nodejs-bigtable/node_modules/google-gax/node_modules/google-auth-library/build/src/auth/googleauth.js:732:36)
at async GoogleAuth.getClient (/home/runner/work/nodejs-bigtable/nodejs-bigtable/node_modules/google-gax/node_modules/google-auth-library/build/src/auth/googleauth.js:709:20)
at async GrpcClient._getCredentials (/home/runner/work/nodejs-bigtable/nodejs-bigtable/node_modules/google-gax/build/src/grpc.js:192:24)
at async GrpcClient.createStub (/home/runner/work/nodejs-bigtable/nodejs-bigtable/node_modules/google-gax/build/src/grpc.js:373:23)
Node.js v20.19.4
test_workflow.go:134: The RPC to test proxy encountered error: rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:48370->127.0.0.1:9999: read: connection reset by peer
test_workflow.go:134: The RPC to test proxy encountered error: rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:48370->127.0.0.1:9999: read: connection reset by peer
test_workflow.go:134: The RPC to test proxy encountered error: rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:48370->127.0.0.1:9999: read: connection reset by peer
test_workflow.go:81: cbt client closing failed: rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:48370->127.0.0.1:9999: read: connection reset by peer
test_workflow.go:81: cbt client closing failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp :9999: connect: connection refused"
--- FAIL: TestReadRows_Generic_CloseClient (1.12s)
=== RUN TestReadRows_Generic_DeadlineExceeded
test_workflow.go:68: cbt client creation failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp :9999: connect: connection refused"
--- FAIL: TestReadRows_Generic_DeadlineExceeded (0.00s)
=== RUN TestSampleRowKeys_Generic_MultiStreams
test_workflow.go:68: cbt client creation failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp :9999: connect: connection refused"
--- FAIL: TestSampleRowKeys_Generic_MultiStreams (0.00s)
=== RUN TestSampleRowKeys_Generic_DeadlineExceeded
test_workflow.go:68: cbt client creation failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp :9999: connect: connection refused"
--- FAIL: TestSampleRowKeys_Generic_DeadlineExceeded (0.00s)
FAIL