Skip to content

Commit

Permalink
fix(deps): update dependency gcp-metadata to ^0.9.0 (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjin authored Oct 29, 2018
1 parent 5840b74 commit b56926a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"console-log-level": "^1.4.0",
"continuation-local-storage": "^3.2.1",
"extend": "^3.0.0",
"gcp-metadata": "^0.7.0",
"gcp-metadata": "^0.9.0",
"hex2dec": "^1.0.1",
"is": "^3.2.0",
"methods": "^1.1.1",
Expand Down
8 changes: 4 additions & 4 deletions src/trace-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ export class TraceWriter extends common.Service {

getHostname(cb: (hostname: string) => void) {
gcpMetadata.instance({property: 'hostname', headers})
.then((res) => {
cb(res.data); // hostname
.then((data) => {
cb(data); // hostname
})
.catch((err: AxiosError) => {
if (err.code !== 'ENOTFOUND') {
Expand All @@ -204,8 +204,8 @@ export class TraceWriter extends common.Service {

getInstanceId(cb: (instanceId?: number) => void) {
gcpMetadata.instance({property: 'id', headers})
.then((res) => {
cb(res.data); // instance ID
.then((data) => {
cb(data); // instance ID
})
.catch((err: AxiosError) => {
if (err.code !== 'ENOTFOUND') {
Expand Down

0 comments on commit b56926a

Please sign in to comment.