This repository was archived by the owner on Jan 21, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Cloud Run metadata lag #1114
Copy link
Copy link
Closed
Labels
api: cloudtraceIssues related to the googleapis/cloud-trace-nodejs API.Issues related to the googleapis/cloud-trace-nodejs API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
In doing some testing with Cloud Trace agent running on Google Cloud run, we're running in to unexplained lag as the result of repeated slow requests to http://metadata.google.internal./computeMetadata/v1/instance/service-accounts/?recursive=true. These requests typically take ~5s and appear randomly across requests as far as we can tell.
The call stack for those metadata calls:
requestTrace (/opt/xxx/node_modules/@google-cloud/trace-agent/build/src/plugins/plugin-http.js:96:26)
<anonymous function> (/opt/xxx/node_modules/node-fetch/lib/index.js:1432:15)
Promise
fetch (/opt/xxx/node_modules/node-fetch/lib/index.js:1401:9)
<anonymous function> (/opt/xxx/node_modules/@google-cloud/storage/node_modules/gaxios/src/gaxios.ts:70:27)
next [as next]
<anonymous function> (/opt/xxx/node_modules/@google-cloud/storage/node_modules/gaxios/build/src/gaxios.js:19:71)
Promise
__awaiter (/opt/xxx/node_modules/@google-cloud/storage/node_modules/gaxios/build/src/gaxios.js:15:12)
request [as request] (/opt/xxx/node_modules/@google-cloud/storage/node_modules/gaxios/build/src/gaxios.js:60:16)
Environment Details
- Node 10 Alpine image
@google-cloud/trace-agentversion 4.0.1
I can work on a minimal repro case, but it seems to be a function of request sampling and dynamic node instantiation, so it's hard to get a good look at whatever is causing this. Is there something I'm obviously doing wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: cloudtraceIssues related to the googleapis/cloud-trace-nodejs API.Issues related to the googleapis/cloud-trace-nodejs API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: investigatingThe issue is under investigation, which is determined to be non-trivial.The issue is under investigation, which is determined to be non-trivial.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
