Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit c63bb14

Browse files
renovate[bot]kjin
authored andcommitted
fix(deps): update dependency @google-cloud/datastore to v4 (#1028)
1 parent b37aa3d commit c63bb14

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

system-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "trace-agent-system-test",
33
"version": "1.0.0",
44
"dependencies": {
5-
"@google-cloud/datastore": "^3.0.0",
5+
"@google-cloud/datastore": "^4.0.0",
66
"express": "^4.16.3",
77
"google-auto-auth": "^0.10.0",
88
"got": "^8.0.0",

system-test/trace-express.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ if (!process.env.GCLOUD_PROJECT ||
3131
const WRITE_CONSISTENCY_DELAY_MS = 20 * 1000;
3232
const projectId = process.env.GCLOUD_PROJECT;
3333
const keyFilename = process.env.GOOGLE_APPLICATION_CREDENTIALS;
34+
const EXPECTED_ENDPOINT = 'google.datastore.v1.Datastore/RunQuery';
3435

3536
// trace-agent must be loaded before everything else.
36-
require('../').start({
37+
const tracer = require('../').start({
3738
projectId: projectId,
3839
keyFilename: keyFilename,
3940
flushDelaySeconds: 1
@@ -142,8 +143,11 @@ describe('express + datastore', () => {
142143
const trace = traces[0];
143144
assert.ok(trace.spans.length >= 2, 'should be at least 2 spans: parent, child');
144145
const parent = trace.spans[0];
145-
const child = trace.spans.find(span =>
146-
span.name === 'grpc:/google.datastore.v1.Datastore/RunQuery');
146+
const child = trace.spans.find(span => {
147+
const datastoreUrl = `https://datastore.googleapis.com/${EXPECTED_ENDPOINT}`;
148+
return span.name === `grpc:/${EXPECTED_ENDPOINT}` ||
149+
span.labels[tracer.labels.HTTP_URL_LABEL_KEY] === datastoreUrl;
150+
});
147151

148152
assert.strictEqual(parent.name, testPath, 'should match unique path');
149153
assert.ok(child);

0 commit comments

Comments
 (0)