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

Commit 23a990a

Browse files
renovate[bot]kjin
authored andcommitted
fix(deps): update dependency @google-cloud/common to v2 (#1038)
* fix(deps): update dependency @google-cloud/common to v2 * fix: add apiEndpoint
1 parent 1e5278b commit 23a990a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"typescript": "~3.5.1"
9494
},
9595
"dependencies": {
96-
"@google-cloud/common": "^1.0.0",
96+
"@google-cloud/common": "^2.0.0",
9797
"@opencensus/propagation-stackdriver": "0.0.13",
9898
"builtin-modules": "^3.0.0",
9999
"console-log-level": "^1.4.0",

src/trace-writer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ headers[Constants.TRACE_AGENT_REQUEST_HEADER] = 1;
3737

3838
/* A list of scopes needed to operate with the trace API */
3939
const SCOPES: string[] = ['https://www.googleapis.com/auth/trace.append'];
40+
/* The API endpoint of the Stackdriver Trace service */
41+
const TRACE_API_ENDPOINT = 'cloudtrace.googleapis.com';
4042

4143
export interface TraceWriterConfig extends common.GoogleAuthOptions {
4244
projectId?: string;
@@ -118,7 +120,8 @@ export class TraceWriter extends common.Service {
118120
{
119121
packageJson: pjson,
120122
projectIdRequired: false,
121-
baseUrl: 'https://cloudtrace.googleapis.com/v1',
123+
apiEndpoint: TRACE_API_ENDPOINT,
124+
baseUrl: `https://${TRACE_API_ENDPOINT}/v1`,
122125
scopes: SCOPES,
123126
},
124127
config

0 commit comments

Comments
 (0)