-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spanner: out of range [0] with length 0 when OTMetrics enabled after client creation #9740
Comments
Related ticket #9519, |
I think several options should exists to use otel metrics.
|
Managing the sequencing of a global I would love to see this get fixed without putting the onus on applications to sequence their calls correctly. IMO the problem with the One way to fix this is to only load the global |
Client
Spanner
Environment
N/A
Go Environment
N/A
Code
e.g.
Expected behavior
No panic
Actual behavior
panic with
out of range [0] with length 0
at https://github.com/googleapis/google-cloud-go/blob/main/spanner/ot_metrics.go#L245 .Screenshots
N/A
Additional context
I'm using Spanner Emulator, so there is no
server-timing
metadata in the response.And client.otConfig is always empty before EnableOpenTelemetryMetrics called.
Our codebase is modular monolith, so some service creates client without EnableOpenTelemetryMetrics but other service creates client with EnableOpenTelemetryMetrics and panics.
The code should be
The text was updated successfully, but these errors were encountered: