Closed rahul2393 closed 1 week ago
TracingSample was not using project_id set via GOOGLE_CLOUD_PROJECT and will use metadata API request to set project on default MetricResource, which causes exception in exporting stats. Reference a) https://github.com/census-instrumentation/opencensus-java/blob/master/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverExportUtils.java#L495-L497 b) https://github.com/googleapis/sdk-platform-java/blob/main/java-core/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java#L42 c) https://github.com/googleapis/sdk-platform-java/blob/main/java-core/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java#L71-L82
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes # ☕️
If you write sample code, please follow the samples format.