spanner: traces created for spanner session ping in opentelemetry sample code #10404
Labels
api: spanner
Issues related to the Spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
samples
Issues that are directly related to samples.
I was trying to run a Go sample code after setting up OpenTelemetry configuration and found traces generated with
google.spanner.v1.Spanner/ExecuteSql
rootSpan which were not from my sample code. Found that these are generated from Spanner session ping method which verifies if the session is still alive or not. Ideally these traces shouldn't be visible in Trace explorer. In case HealthCheckInterval defined in ClientConfig is very low then it can lead to a lot of traces generated for Spanner Session ping.It seems that we are using OpenCensus trace library to start a Span with NeverSample option in ping method and recommendation is to use https://pkg.go.dev/cloud.google.com/go/internal/trace
Code
Reproducer
Expected behavior
Traces of Spanner session ping shouldn't be visible in Trace explorer.
Actual behavior
Traces of Spanner session ping visible in Trace explorer.
Screenshots
The text was updated successfully, but these errors were encountered: