Skip to content
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: unsupported sampler error occurs while keeping the session alive #11431

Open
mk2taiga opened this issue Jan 10, 2025 · 0 comments
Open
Assignees
Labels
api: spanner Issues related to the Spanner API. samples Issues that are directly related to samples. triage me I really want to be triaged.

Comments

@mk2taiga
Copy link

Client

go-spanner

Environment

GKE

Go Environment

$ go version
1.22.9

Using https://pkg.go.dev/cloud.google.com/go/spanner v1.73.0

Code and Dependencies

go library for Spanner suggests that there is no need to handle session on our own and we are not doing any of the thing on our own. It's the HealthCheckWorker which is doing all of the things on it's own.

Why is this error occurring?

L299 octrace.WithSampler(octrace.NeverSample()) specifies the sampler.
See: https://github.com/googleapis/google-cloud-go/blob/main/spanner/session.go#L299-L300

However, if you check the opentelemetry-go implementation, it returns an error if sampler is not nil.
See: https://github.com/open-telemetry/opentelemetry-go/blob/main/bridge/opencensus/internal/oc2otel/tracer_start_options.go#L32

Why is it calling StartSpan even though it is not sampling?
Also, only this code uses OpenCensus to run StartSpan.

How about erasing the L299 to L300 code based on the following two points

If you have other ideas, I would appreciate your input.

Expected behavior

There should not be any error while executing Select 1 .

Actual behavior

Getting Below error
starting span "cloud.google.com/go/spanner.ping": unsupported sampler: 0x158af20

Additional context

A similar Issue has been created previously, but the problem still persists.

@mk2taiga mk2taiga added the triage me I really want to be triaged. label Jan 10, 2025
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 10, 2025
@codyoss codyoss changed the title unsupported sampler error occurs while keeping the session alive spanner: unsupported sampler error occurs while keeping the session alive Jan 10, 2025
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. samples Issues that are directly related to samples. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants