Skip to content

Commit 2e6e135

Browse files
committed
Merge remote-tracking branch 'googleapis/main'
2 parents 56459f1 + e859b29 commit 2e6e135

File tree

212 files changed

+32316
-3165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+32316
-3165
lines changed

.github/.OwlBot.lock.yaml

-17
This file was deleted.

.github/release-please.yml

+4
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ branches:
3434
bumpMinorPreMajor: true
3535
handleGHRelease: true
3636
branch: 6.55.x
37+
- releaseType: java-backport
38+
bumpMinorPreMajor: true
39+
handleGHRelease: true
40+
branch: 6.67.x

.github/sync-repo-settings.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ branchProtectionRules:
1919
- checkstyle
2020
- compile (8)
2121
- compile (11)
22-
- OwlBot Post Processor
2322
- units-with-multiplexed-session (8)
2423
- units-with-multiplexed-session (11)
2524
- pattern: 3.3.x
@@ -141,7 +140,6 @@ branchProtectionRules:
141140
- checkstyle
142141
- compile (8)
143142
- compile (11)
144-
- OwlBot Post Processor
145143
permissionRules:
146144
- team: yoshi-admins
147145
permission: admin

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- run: .kokoro/build.sh
5353
env:
5454
JOB_TYPE: test
55-
GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS: true
55+
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
5656
units-java8:
5757
# Building using Java 17 and run the tests with Java 8 runtime
5858
name: "units (8)"
@@ -91,7 +91,7 @@ jobs:
9191
- run: .kokoro/build.sh
9292
env:
9393
JOB_TYPE: test
94-
GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS: true
94+
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
9595
windows:
9696
runs-on: windows-latest
9797
steps:

.github/workflows/integration-tests-against-emulator-with-multiplexed-session.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
env:
4040
JOB_TYPE: test
4141
SPANNER_EMULATOR_HOST: localhost:9010
42-
GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS: true
42+
GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true

.github/workflows/unmanaged_dependency_check.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
# repository
1818
.kokoro/build.sh
1919
- name: Unmanaged dependency check
20-
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.30.1
20+
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.32.0
2121
with:
2222
bom-path: google-cloud-spanner-bom/pom.xml

.kokoro/presubmit/graalvm-native-17.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.30.1"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.32.0"
77
}
88

99
env_vars: {

.kokoro/presubmit/graalvm-native.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.30.1"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.32.0"
77
}
88

99
env_vars: {

.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ env_vars: {
3333
}
3434

3535
env_vars: {
36-
key: "GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS"
36+
key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"
3737
value: "true"
38-
}
38+
}

.readme-partials.yaml

+52-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ custom_content: |
153153
154154
#### OpenTelemetry SQL Statement Tracing
155155
The OpenTelemetry traces that are generated by the Java client include any request and transaction
156-
tags that have been set. The traces can also include the SQL statements that are executed. Enable
157-
this with the `enableExtendedTracing` option:
156+
tags that have been set. The traces can also include the SQL statements that are executed and the
157+
name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
158+
option:
158159
159160
```
160161
SpannerOptions options = SpannerOptions.newBuilder()
@@ -166,6 +167,23 @@ custom_content: |
166167
This option can also be enabled by setting the environment variable
167168
`SPANNER_ENABLE_EXTENDED_TRACING=true`.
168169
170+
#### OpenTelemetry API Tracing
171+
You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
172+
option. These traces also include any retry attempts for an API call:
173+
174+
```
175+
SpannerOptions options = SpannerOptions.newBuilder()
176+
.setOpenTelemetry(openTelemetry)
177+
.setEnableApiTracing(true)
178+
.build();
179+
```
180+
181+
This option can also be enabled by setting the environment variable
182+
`SPANNER_ENABLE_API_TRACING=true`.
183+
184+
> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
185+
186+
169187
### Instrument with OpenCensus
170188
171189
> Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/).
@@ -298,6 +316,38 @@ custom_content: |
298316
299317
Spanner spanner = options.getService();
300318
```
319+
320+
#### OpenTelemetry SQL Statement Tracing
321+
The OpenTelemetry traces that are generated by the Java client include any request and transaction
322+
tags that have been set. The traces can also include the SQL statements that are executed and the
323+
name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
324+
option:
325+
326+
```
327+
SpannerOptions options = SpannerOptions.newBuilder()
328+
.setOpenTelemetry(openTelemetry)
329+
.setEnableExtendedTracing(true)
330+
.build();
331+
```
332+
333+
This option can also be enabled by setting the environment variable
334+
`SPANNER_ENABLE_EXTENDED_TRACING=true`.
335+
336+
#### OpenTelemetry API Tracing
337+
You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
338+
option. These traces also include any retry attempts for an API call:
339+
340+
```
341+
SpannerOptions options = SpannerOptions.newBuilder()
342+
.setOpenTelemetry(openTelemetry)
343+
.setEnableApiTracing(true)
344+
.build();
345+
```
346+
347+
This option can also be enabled by setting the environment variable
348+
`SPANNER_ENABLE_API_TRACING=true`.
349+
350+
> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
301351
302352
## Migrate from OpenCensus to OpenTelemetry
303353

.repo-metadata.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
"api_shortname": "spanner",
33
"name_pretty": "Cloud Spanner",
44
"product_documentation": "https://cloud.google.com/spanner/docs/",
5+
"api_description": "is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, \\nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \\nfor high availability.\\n\\nBe sure to activate the Cloud Spanner API on the Developer's Console to\\nuse Cloud Spanner from your project.",
56
"client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history",
6-
"api_description": "is a fully managed, mission-critical, \nrelational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project.",
7-
"issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
87
"release_level": "stable",
8+
"transport": "both",
99
"language": "java",
10-
"min_java_version": 8,
1110
"repo": "googleapis/java-spanner",
1211
"repo_short": "java-spanner",
1312
"distribution_name": "com.google.cloud:google-cloud-spanner",
1413
"api_id": "spanner.googleapis.com",
15-
"transport": "grpc",
14+
"library_type": "GAPIC_COMBO",
1615
"requires_billing": true,
1716
"codeowner_team": "@googleapis/api-spanner-java",
18-
"library_type": "GAPIC_COMBO",
1917
"excluded_poms": "google-cloud-spanner-bom",
20-
"recommended_package": "com.google.cloud.spanner"
21-
}
22-
18+
"issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
19+
"recommended_package": "com.google.cloud.spanner",
20+
"min_java_version": 8
21+
}

CHANGELOG.md

+47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# Changelog
22

3+
## [6.71.0](https://github.com/googleapis/java-spanner/compare/v6.70.0...v6.71.0) (2024-07-03)
4+
5+
6+
### Features
7+
8+
* Include thread name in traces ([#3173](https://github.com/googleapis/java-spanner/issues/3173)) ([92b1e07](https://github.com/googleapis/java-spanner/commit/92b1e079e6093bc4a2e7b458c1bbe0f62a0fada9))
9+
* Support multiplexed sessions for RO transactions ([#3141](https://github.com/googleapis/java-spanner/issues/3141)) ([2b8e9ed](https://github.com/googleapis/java-spanner/commit/2b8e9ededc1ea1a5e8d4f90083f2cf862fcc198a))
10+
11+
## [6.70.0](https://github.com/googleapis/java-spanner/compare/v6.69.0...v6.70.0) (2024-06-27)
12+
13+
14+
### Features
15+
16+
* Add field order_by in spanner.proto ([#3064](https://github.com/googleapis/java-spanner/issues/3064)) ([52ee196](https://github.com/googleapis/java-spanner/commit/52ee1967ee3a37fb0482ad8b51c6e77e28b79844))
17+
18+
19+
### Bug Fixes
20+
21+
* Do not end transaction span when rolling back to savepoint ([#3167](https://github.com/googleapis/java-spanner/issues/3167)) ([8ec0cf2](https://github.com/googleapis/java-spanner/commit/8ec0cf2032dece545c9e4d8a794b80d06550b710))
22+
* Remove unused DmlBatch span ([#3147](https://github.com/googleapis/java-spanner/issues/3147)) ([f7891c1](https://github.com/googleapis/java-spanner/commit/f7891c1ca42727c775cdbe91bff8d55191a3d799))
23+
24+
25+
### Dependencies
26+
27+
* Update dependencies ([#3181](https://github.com/googleapis/java-spanner/issues/3181)) ([0c787e6](https://github.com/googleapis/java-spanner/commit/0c787e6fa67d2a259a76bbd2d7f1cfa20a1dbee8))
28+
* Update dependency com.google.cloud:sdk-platform-java-config to v3.32.0 ([#3184](https://github.com/googleapis/java-spanner/issues/3184)) ([9c85a6f](https://github.com/googleapis/java-spanner/commit/9c85a6fabea527253ea40a8970cc9071804d94c4))
29+
* Update dependency commons-cli:commons-cli to v1.8.0 ([#3073](https://github.com/googleapis/java-spanner/issues/3073)) ([36b5340](https://github.com/googleapis/java-spanner/commit/36b5340ef8bf197fbc8ed882f76caff9a6fe84b6))
30+
31+
## [6.69.0](https://github.com/googleapis/java-spanner/compare/v6.68.1...v6.69.0) (2024-06-12)
32+
33+
34+
### Features
35+
36+
* Add option to enable ApiTracer ([#3095](https://github.com/googleapis/java-spanner/issues/3095)) ([a0a4bc5](https://github.com/googleapis/java-spanner/commit/a0a4bc58d4269a8c1e5e76d9a0469f649bb69148))
37+
38+
39+
### Dependencies
40+
41+
* Update dependency com.google.cloud:sdk-platform-java-config to v3.31.0 ([#3159](https://github.com/googleapis/java-spanner/issues/3159)) ([1ee19d1](https://github.com/googleapis/java-spanner/commit/1ee19d19c2db30d79c8741cc5739de1c69fb95f9))
42+
43+
## [6.68.1](https://github.com/googleapis/java-spanner/compare/v6.68.0...v6.68.1) (2024-05-29)
44+
45+
46+
### Bug Fixes
47+
48+
* Make SessionPoolOptions#setUseMultiplexedSession(boolean) package private ([#3130](https://github.com/googleapis/java-spanner/issues/3130)) ([575c3e0](https://github.com/googleapis/java-spanner/commit/575c3e01541e12294dd37a622f0b1dca52d200ba))
49+
350
## [6.68.0](https://github.com/googleapis/java-spanner/compare/v6.67.0...v6.68.0) (2024-05-27)
451

552

README.md

+58-14
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,20 @@ If you are using Maven without the BOM, add this to your dependencies:
5050
If you are using Gradle 5.x or later, add this to your dependencies:
5151

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:26.39.0')
53+
implementation platform('com.google.cloud:libraries-bom:26.43.0')
5454
5555
implementation 'com.google.cloud:google-cloud-spanner'
5656
```
5757
If you are using Gradle without BOM, add this to your dependencies:
5858

5959
```Groovy
60-
implementation 'com.google.cloud:google-cloud-spanner:6.67.0'
60+
implementation 'com.google.cloud:google-cloud-spanner:6.71.0'
6161
```
6262

6363
If you are using SBT, add this to your dependencies:
6464

6565
```Scala
66-
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.67.0"
66+
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.71.0"
6767
```
6868
<!-- {x-version-update-end} -->
6969

@@ -93,13 +93,7 @@ to add `google-cloud-spanner` as a dependency in your code.
9393
## About Cloud Spanner
9494

9595

96-
[Cloud Spanner][product-docs] is a fully managed, mission-critical,
97-
relational database service that offers transactional consistency at global scale,
98-
schemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication
99-
for high availability.
100-
101-
Be sure to activate the Cloud Spanner API on the Developer's Console to
102-
use Cloud Spanner from your project.
96+
[Cloud Spanner][product-docs] is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project.
10397

10498
See the [Cloud Spanner client library docs][javadocs] to learn how to
10599
use this Cloud Spanner Client Library.
@@ -259,8 +253,9 @@ Spanner spanner = options.getService();
259253

260254
#### OpenTelemetry SQL Statement Tracing
261255
The OpenTelemetry traces that are generated by the Java client include any request and transaction
262-
tags that have been set. The traces can also include the SQL statements that are executed. Enable
263-
this with the `enableExtendedTracing` option:
256+
tags that have been set. The traces can also include the SQL statements that are executed and the
257+
name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
258+
option:
264259

265260
```
266261
SpannerOptions options = SpannerOptions.newBuilder()
@@ -272,6 +267,23 @@ SpannerOptions options = SpannerOptions.newBuilder()
272267
This option can also be enabled by setting the environment variable
273268
`SPANNER_ENABLE_EXTENDED_TRACING=true`.
274269

270+
#### OpenTelemetry API Tracing
271+
You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
272+
option. These traces also include any retry attempts for an API call:
273+
274+
```
275+
SpannerOptions options = SpannerOptions.newBuilder()
276+
.setOpenTelemetry(openTelemetry)
277+
.setEnableApiTracing(true)
278+
.build();
279+
```
280+
281+
This option can also be enabled by setting the environment variable
282+
`SPANNER_ENABLE_API_TRACING=true`.
283+
284+
> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
285+
286+
275287
### Instrument with OpenCensus
276288

277289
> Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/).
@@ -405,6 +417,38 @@ SpannerOptions options = SpannerOptions.newBuilder()
405417
Spanner spanner = options.getService();
406418
```
407419

420+
#### OpenTelemetry SQL Statement Tracing
421+
The OpenTelemetry traces that are generated by the Java client include any request and transaction
422+
tags that have been set. The traces can also include the SQL statements that are executed and the
423+
name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
424+
option:
425+
426+
```
427+
SpannerOptions options = SpannerOptions.newBuilder()
428+
.setOpenTelemetry(openTelemetry)
429+
.setEnableExtendedTracing(true)
430+
.build();
431+
```
432+
433+
This option can also be enabled by setting the environment variable
434+
`SPANNER_ENABLE_EXTENDED_TRACING=true`.
435+
436+
#### OpenTelemetry API Tracing
437+
You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
438+
option. These traces also include any retry attempts for an API call:
439+
440+
```
441+
SpannerOptions options = SpannerOptions.newBuilder()
442+
.setOpenTelemetry(openTelemetry)
443+
.setEnableApiTracing(true)
444+
.build();
445+
```
446+
447+
This option can also be enabled by setting the environment variable
448+
`SPANNER_ENABLE_API_TRACING=true`.
449+
450+
> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
451+
408452
## Migrate from OpenCensus to OpenTelemetry
409453

410454
> Using the [OpenTelemetry OpenCensus Bridge](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-opencensus-shim), you can immediately begin exporting your metrics and traces with OpenTelemetry
@@ -577,7 +621,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr
577621

578622
## Transport
579623

580-
Cloud Spanner uses gRPC for the transport layer.
624+
Cloud Spanner uses both gRPC and HTTP/JSON for the transport layer.
581625

582626
## Supported Java Versions
583627

@@ -671,7 +715,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
671715
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
672716
[stability-image]: https://img.shields.io/badge/stability-stable-green
673717
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
674-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.67.0
718+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.71.0
675719
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
676720
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
677721
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

0 commit comments

Comments
 (0)