Currently, this package is using Google Cloud official metadata Go SDK to fetch metadata (cloud.google.com/go/compute/metadata). However, this package is made for the GCE instance metadata server in mind and doesn't follow the Cloud Run runtime contract, which states that:
To access metadata server data, use HTTP requests to the http://metadata.google.internal/ endpoint with the Metadata-Flavor: Google header: no client libraries are required. For more information, see Getting metadata.
While this works because currently metadata.google.internal points at the same 169.254.169.254 IP address, the runtime contract makes no such guarantees.