census-instrumentation/opencensus-node

Fails to record metrics when running from GCP Cloud Run

patwhite opened this issue · 1 comments

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

0.0.18

What version of Node are you using?

10.15

What did you do?

Create a simple docker container which exports a metric using the stackdriver exporter. Deploy to Google Cloud Run.

What did you expect to see?

Metrics successfully logged to stackdriver

What did you see instead?

One or more TimeSeries could not be written: The set of resource labels is incomplete. Missing labels: (instance_id).: timeSeries[0]

Additional context

Add any other context about the problem here.
Appears to happen because it's trying to use the GCP VM defaults, but instance ID is not a cloud run construct. There's probably a way to override this, but I'm not sure how to do it, would love that as a workaround for the time being.

Published in 0.0.19, let us know if you encounter any issues!