Skip to content

Commit

Permalink
fix(deps): update dependency @google-cloud/common to v2 (#1038)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency @google-cloud/common to v2

* fix: add apiEndpoint
  • Loading branch information
renovate[bot] authored and kjin committed May 31, 2019
1 parent 1e5278b commit 23a990a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"typescript": "~3.5.1"
},
"dependencies": {
"@google-cloud/common": "^1.0.0",
"@google-cloud/common": "^2.0.0",
"@opencensus/propagation-stackdriver": "0.0.13",
"builtin-modules": "^3.0.0",
"console-log-level": "^1.4.0",
Expand Down
5 changes: 4 additions & 1 deletion src/trace-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ headers[Constants.TRACE_AGENT_REQUEST_HEADER] = 1;

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

export interface TraceWriterConfig extends common.GoogleAuthOptions {
projectId?: string;
Expand Down Expand Up @@ -118,7 +120,8 @@ export class TraceWriter extends common.Service {
{
packageJson: pjson,
projectIdRequired: false,
baseUrl: 'https://cloudtrace.googleapis.com/v1',
apiEndpoint: TRACE_API_ENDPOINT,
baseUrl: `https://${TRACE_API_ENDPOINT}/v1`,
scopes: SCOPES,
},
config
Expand Down

0 comments on commit 23a990a

Please sign in to comment.