GoogleCloudPlatform / opentelemetry-operations-go

Apache License 2.0
130 stars 100 forks source link

Resource detector returns invalid zone on GAE standard #847

Closed aabmass closed 4 months ago

aabmass commented 4 months ago

Similar to https://github.com/GoogleCloudPlatform/opentelemetry-operations-js/issues/655, the Go detector has the same issue. GAE standard returns zone string with slashes which need to be stripped out.

aabmass commented 4 months ago

After doing some test, It turns out the Go detector doesn't have this issue. The metadata library already handles the zone string having slashes: https://github.com/googleapis/google-cloud-go/blob/b952f41fc832fbe5ed74f47ae0e6d6f2e93448e0/compute/metadata/metadata.go#L468