Skip to content

Commit

Permalink
feat(spanner): add support of using multiplexed session with ReadOnly…
Browse files Browse the repository at this point in the history
…Transactions (#10269)

* feat(spanner): add support of using multiplexed session with ReadOnlyTransactions

* fallback to regular sessions if backend returns Unimplemented error

* add metic label for is_multiplexed filter

* fix integration tests

* refresh multiplex session asynchronously

* fix  env

* fix permission issue

* fix presubmit file

* fixed tests

* incorporate changes

* fix tests

* incorporate changes

* fix vet

* fix vet

* fix tests

* remove idempotent assignment

* incorporate changes

* fix integration test for TestIntegration_DbRemovalRecovery

* add TODO comment for TestIntegration_DbRemovalRecovery integration tests
  • Loading branch information
rahul2393 authored Aug 7, 2024
1 parent dbf480c commit 7797022
Show file tree
Hide file tree
Showing 20 changed files with 1,335 additions and 219 deletions.
26 changes: 14 additions & 12 deletions spanner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,20 @@ type ClientConfig struct {
}

type openTelemetryConfig struct {
meterProvider metric.MeterProvider
attributeMap []attribute.KeyValue
otMetricRegistration metric.Registration
openSessionCount metric.Int64ObservableGauge
maxAllowedSessionsCount metric.Int64ObservableGauge
sessionsCount metric.Int64ObservableGauge
maxInUseSessionsCount metric.Int64ObservableGauge
getSessionTimeoutsCount metric.Int64Counter
acquiredSessionsCount metric.Int64Counter
releasedSessionsCount metric.Int64Counter
gfeLatency metric.Int64Histogram
gfeHeaderMissingCount metric.Int64Counter
meterProvider metric.MeterProvider
attributeMap []attribute.KeyValue
attributeMapWithMultiplexed []attribute.KeyValue
attributeMapWithoutMultiplexed []attribute.KeyValue
otMetricRegistration metric.Registration
openSessionCount metric.Int64ObservableGauge
maxAllowedSessionsCount metric.Int64ObservableGauge
sessionsCount metric.Int64ObservableGauge
maxInUseSessionsCount metric.Int64ObservableGauge
getSessionTimeoutsCount metric.Int64Counter
acquiredSessionsCount metric.Int64Counter
releasedSessionsCount metric.Int64Counter
gfeLatency metric.Int64Histogram
gfeHeaderMissingCount metric.Int64Counter
}

func contextWithOutgoingMetadata(ctx context.Context, md metadata.MD, disableRouteToLeader bool) context.Context {
Expand Down
Loading

0 comments on commit 7797022

Please sign in to comment.