Closed qingling128 closed 4 years ago
You can't make changes to the vendor directory like that; modern Go tooling will overwrite/ignore it. You need to put this upstream, or fork the upstream repo and change go.mod
to point to the fork.
The upstream PR has been approved and merged: https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/pull/264.
Hi, when is the next release gonna happen? Any rough ETA?
Please reopen this issue. As mentioned in https://github.com/Stackdriver/stackdriver-prometheus-sidecar/pull/238#issuecomment-644326957 somehow, go.mod
should be updated for contrib.go.opencensus.io/exporter/stackdriver
. It is still pointing v0.12.8
, but should be v0.13.2
(or higher).
Oh, sorry. The Hi, when is the next release gonna happen? Any rough ETA?
is meant for the other PR in upstream (https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/pull/264). I put it in the wrong PR. This current one is already closed.
Fixes the following error when the
labels
is not initialized:Labels can be optionally extracted from OC_RESOURCE_TYPE and OC_RESOURCE_LABELS env vars (https://github.com/census-instrumentation/opencensus-go/blob/1901b56b9515b0c34f5d25a5bce982dfc543d64b/resource/resource.go#L30). In case those envs are not set, labels will not be initialized: https://github.com/census-instrumentation/opencensus-go/blob/1901b56b9515b0c34f5d25a5bce982dfc543d64b/resource/resource.go#L98
For the case here, we are in fact sending metrics to Stackdriver. So OC_RESOURCE_TYPE and OC_RESOURCE_LABELS may not be needed. But we should init the Labels field.
I'll send an equivalent PR to the upstream repo as well.