googleapis / googleapis/google-cloud-go
spanner: support disabling opentelemetry spans
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
## Is your feature request related to a problem? Please describe.
I am trying to reduce the spans that my service is producing. Majority of it are from the spanner library.
There is only a limited way I can reduce the spans using the library and that is with `option.WithTelemetryDisabled()`.
Following cannot be removed any other way.
- cloud.google.com/go/spanner.RowIterator
- cloud.google.com/go/spanner.Query
- cloud.google.com/go/spanner.ReadWriteTransaction
Additionally, span events are treated as spans by our telemetry vendor and so they count as span. There is also no way through spanner lib to disable them except to totally reduce to 0 the span event limit for the whole service.
## Describe the solution you'd like
Update the code such that `option.WithTelemetryDisabled()` disables all spans and events and not just the outgoing calls.
## Describe alternatives you've considered
Allow spanner library to receive tracer or traceprovider rather than using global.
## Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
Assessment
This issue has not been assessed yet.