opencensus-go-exporter-stackdriver icon indicating copy to clipboard operation
opencensus-go-exporter-stackdriver copied to clipboard

Kubernetes operator support

Open mwuertinger opened this issue 5 years ago • 3 comments

The OpenCensus Kubernetes Operator sets the environment variables OC_RESOURCE_TYPE and OC_RESOURCE_LABELS. The function monitoredresource.Autodetect() should use those values if present.

mwuertinger avatar Mar 26 '19 13:03 mwuertinger

Stackdriver exporter will be migrated to use the Resource APIs (https://github.com/census-instrumentation/opencensus-go/tree/master/resource) once they're released. Resource APIs support reading the resource types and labels: https://github.com/census-instrumentation/opencensus-go/blob/master/resource/resource.go#L29-L33

songy23 avatar Mar 26 '19 17:03 songy23

Does this mean that monitoredresource.Autodetect() will be deprecated then?

mwuertinger avatar Mar 29 '19 10:03 mwuertinger

Yes, monitoredresource will be deprecated and generic resource will be used instead, similar to what happened in Java: https://github.com/census-instrumentation/opencensus-java/pull/1744 and https://github.com/census-instrumentation/opencensus-java/pull/1745.

songy23 avatar Mar 29 '19 16:03 songy23