You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2026. It is now read-only.
There's an issue with Spanner JDBC driver when run locally (outside of GCP). It boils down to how during connection initialisation it tries to determine whether it's running inside GCP, using an http request to metadata.google.internal which, at least on macOS takes up to 150 seconds to fail, and since this is a blocking call it means that any connection can take that long to be established. This makes it impossible to use the newer versions of the driver (newer than 2.26.1) for local development.
The function in question is com.google.cloud.opentelemetry.detection.GCPPlatformDetector#isRunningOnGcp
Here are two rough paths I found that lead to that function called during initialisation, one of them can be turned off by disabling grpc metrics, but the other one is not possible to override.