Skip to content

Commit 8e0faba

Browse files
committed
Merge branch 'main' into PR #2537 to update
2 parents a0833b8 + e92debc commit 8e0faba

File tree

22 files changed

+192
-170
lines changed

22 files changed

+192
-170
lines changed

.github/workflows/unmanaged_dependency_check.yaml

Lines changed: 1 addition & 1 deletion
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.53.0
20+
uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.54.1
2121
with:
2222
bom-path: google-cloud-pubsub-bom/pom.xml

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

Lines changed: 1 addition & 1 deletion
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.53.0" # {x-version-update:google-cloud-shared-dependencies:current}
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.54.1" # {x-version-update:google-cloud-shared-dependencies:current}
77
}
88

99
env_vars: {

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

Lines changed: 1 addition & 1 deletion
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.53.0" # {x-version-update:google-cloud-shared-dependencies:current}
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.54.1" # {x-version-update:google-cloud-shared-dependencies:current}
77
}
88

99
env_vars: {

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

Lines changed: 1 addition & 1 deletion
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_c:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current}
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.54.1" # {x-version-update:google-cloud-shared-dependencies:current}
77
}
88

99
env_vars: {

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## [1.143.1](https://github.com/googleapis/java-pubsub/compare/v1.143.0...v1.143.1) (2025-11-13)
4+
5+
6+
### Bug Fixes
7+
8+
* Deflake WaiterTest ([#2600](https://github.com/googleapis/java-pubsub/issues/2600)) ([298c8db](https://github.com/googleapis/java-pubsub/commit/298c8db04616341da040935636b1a04ce5f022a0))
9+
* **deps:** Update the Java code generator (gapic-generator-java) to 2.64.1 ([b210251](https://github.com/googleapis/java-pubsub/commit/b2102516bf833c2704c85cb348b67bb7cbfdb3a6))
10+
11+
12+
### Dependencies
13+
14+
* Remove OpenTelemetry semconv dependency ([#2611](https://github.com/googleapis/java-pubsub/issues/2611)) ([240fc37](https://github.com/googleapis/java-pubsub/commit/240fc3784db3860eb2668946fbf861beed2647d7))
15+
* Update actions/checkout action to v5 ([#2592](https://github.com/googleapis/java-pubsub/issues/2592)) ([6ca466d](https://github.com/googleapis/java-pubsub/commit/6ca466d382ddde9780ae1c8627092d731e314f90))
16+
* Update dependency com.google.cloud:google-cloud-bigquery to v2.55.3 ([#2602](https://github.com/googleapis/java-pubsub/issues/2602)) ([d14106c](https://github.com/googleapis/java-pubsub/commit/d14106cc278c98d3f954f959e2dd3764ebd20fc2))
17+
* Update dependency com.google.cloud:google-cloud-core to v2.61.0 ([#2588](https://github.com/googleapis/java-pubsub/issues/2588)) ([244cf75](https://github.com/googleapis/java-pubsub/commit/244cf758bf46f8431a17b1d8e76d1d90c494fc76))
18+
* Update dependency com.google.cloud:google-cloud-storage to v2.59.0 ([#2603](https://github.com/googleapis/java-pubsub/issues/2603)) ([d9d05bf](https://github.com/googleapis/java-pubsub/commit/d9d05bfa18580cdacdfa9378d30b56ce0ae0d4d2))
19+
* Update dependency com.google.cloud:sdk-platform-java-config to v3.54.1 ([#2609](https://github.com/googleapis/java-pubsub/issues/2609)) ([c99373f](https://github.com/googleapis/java-pubsub/commit/c99373f2d25c6b9f1bcb6aace3c6625375310a16))
20+
* Update dependency com.google.protobuf:protobuf-java-util to v4.33.0 ([#2587](https://github.com/googleapis/java-pubsub/issues/2587)) ([33724ce](https://github.com/googleapis/java-pubsub/commit/33724cef79e3f7e798c5ef222ee7dff3565555f8))
21+
322
## [1.143.0](https://github.com/googleapis/java-pubsub/compare/v1.142.0...v1.143.0) (2025-10-20)
423

524

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.70.0</version>
22+
<version>26.71.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -43,7 +43,7 @@ If you are using Maven without the BOM, add this to your dependencies:
4343
<dependency>
4444
<groupId>com.google.cloud</groupId>
4545
<artifactId>google-cloud-pubsub</artifactId>
46-
<version>1.142.0</version>
46+
<version>1.143.0</version>
4747
</dependency>
4848

4949
```
@@ -58,13 +58,13 @@ implementation 'com.google.cloud:google-cloud-pubsub'
5858
If you are using Gradle without BOM, add this to your dependencies:
5959

6060
```Groovy
61-
implementation 'com.google.cloud:google-cloud-pubsub:1.143.0'
61+
implementation 'com.google.cloud:google-cloud-pubsub:1.143.1'
6262
```
6363

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

6666
```Scala
67-
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.143.0"
67+
libraryDependencies += "com.google.cloud" % "google-cloud-pubsub" % "1.143.1"
6868
```
6969

7070
## Authentication
@@ -420,7 +420,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
420420
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-pubsub/java11.html
421421
[stability-image]: https://img.shields.io/badge/stability-stable-green
422422
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-pubsub.svg
423-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.143.0
423+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-pubsub/1.143.1
424424
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
425425
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
426426
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

generation_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
gapic_generator_version: 2.63.0
2-
googleapis_commitish: b1a9eefc2e1021fb9465bdac5e2984499451ae34
1+
gapic_generator_version: 2.64.1
2+
googleapis_commitish: 5342712986262b93211b136eb4bd6fb79b3764af
33
libraries_bom_version: 26.71.0
44
libraries:
55
- api_shortname: pubsub

google-cloud-pubsub-bom/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
55
<artifactId>google-cloud-pubsub-bom</artifactId>
6-
<version>1.143.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-pubsub:current} -->
6+
<version>1.143.1</version><!-- {x-version-update:google-cloud-pubsub:current} -->
77
<packaging>pom</packaging>
88
<parent>
99
<groupId>com.google.cloud</groupId>
1010
<artifactId>sdk-platform-java-config</artifactId>
11-
<version>3.53.0</version>
11+
<version>3.54.1</version>
1212
</parent>
1313

1414
<name>Google Cloud pubsub BOM</name>
@@ -52,17 +52,17 @@
5252
<dependency>
5353
<groupId>com.google.cloud</groupId>
5454
<artifactId>google-cloud-pubsub</artifactId>
55-
<version>1.143.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-pubsub:current} -->
55+
<version>1.143.1</version><!-- {x-version-update:google-cloud-pubsub:current} -->
5656
</dependency>
5757
<dependency>
5858
<groupId>com.google.api.grpc</groupId>
5959
<artifactId>grpc-google-cloud-pubsub-v1</artifactId>
60-
<version>1.125.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-pubsub-v1:current} -->
60+
<version>1.125.1</version><!-- {x-version-update:grpc-google-cloud-pubsub-v1:current} -->
6161
</dependency>
6262
<dependency>
6363
<groupId>com.google.api.grpc</groupId>
6464
<artifactId>proto-google-cloud-pubsub-v1</artifactId>
65-
<version>1.125.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-pubsub-v1:current} -->
65+
<version>1.125.1</version><!-- {x-version-update:proto-google-cloud-pubsub-v1:current} -->
6666
</dependency>
6767
</dependencies>
6868
</dependencyManagement>

google-cloud-pubsub/pom.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.google.cloud</groupId>
55
<artifactId>google-cloud-pubsub</artifactId>
6-
<version>1.143.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-pubsub:current} -->
6+
<version>1.143.1</version><!-- {x-version-update:google-cloud-pubsub:current} -->
77
<packaging>jar</packaging>
88
<name>Google Cloud Pub/Sub</name>
99
<url>https://github.com/googleapis/java-pubsub</url>
1010
<description>Java idiomatic client for Google Cloud Pub/Sub</description>
1111
<parent>
1212
<groupId>com.google.cloud</groupId>
1313
<artifactId>google-cloud-pubsub-parent</artifactId>
14-
<version>1.143.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-pubsub:current} -->
14+
<version>1.143.1</version><!-- {x-version-update:google-cloud-pubsub:current} -->
1515
</parent>
1616
<properties>
1717
<site.installationModule>google-cloud-pubsub</site.installationModule>
@@ -108,10 +108,6 @@
108108
<groupId>io.opentelemetry</groupId>
109109
<artifactId>opentelemetry-context</artifactId>
110110
</dependency>
111-
<dependency>
112-
<groupId>io.opentelemetry</groupId>
113-
<artifactId>opentelemetry-semconv</artifactId>
114-
</dependency>
115111

116112
<!-- Test dependencies -->
117113
<dependency>

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/OpenTelemetryPubsubTracer.java

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import io.opentelemetry.api.trace.StatusCode;
2828
import io.opentelemetry.api.trace.Tracer;
2929
import io.opentelemetry.context.Context;
30-
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
3130
import java.util.List;
3231

3332
public class OpenTelemetryPubsubTracer {
@@ -40,6 +39,13 @@ public class OpenTelemetryPubsubTracer {
4039
"subscriber concurrency control";
4140
private static final String SUBSCRIBE_SCHEDULER_SPAN_NAME = "subscriber scheduler";
4241

42+
private static final String MESSAGING_SYSTEM_ATTR_KEY = "messaging.system";
43+
private static final String MESSAGING_DESTINATION_NAME_ATTR_KEY = "messaging.destination.name";
44+
private static final String CODE_FUNCTION_ATTR_KEY = "code.function";
45+
private static final String MESSAGING_OPERATION_ATTR_KEY = "messaging.operation";
46+
private static final String MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY =
47+
"messaging.batch.message_count";
48+
private static final String MESSAGING_MESSAGE_ID_ATTR_KEY = "messaging.message.id";
4349
private static final String MESSAGE_SIZE_ATTR_KEY = "messaging.message.body.size";
4450
private static final String ORDERING_KEY_ATTR_KEY = "messaging.gcp_pubsub.message.ordering_key";
4551
private static final String MESSAGE_ACK_ID_ATTR_KEY = "messaging.gcp_pubsub.message.ack_id";
@@ -66,12 +72,12 @@ private static final AttributesBuilder createCommonSpanAttributesBuilder(
6672
String destinationName, String projectName, String codeFunction, String operation) {
6773
AttributesBuilder attributesBuilder =
6874
Attributes.builder()
69-
.put(SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE)
70-
.put(SemanticAttributes.MESSAGING_DESTINATION_NAME, destinationName)
75+
.put(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE)
76+
.put(MESSAGING_DESTINATION_NAME_ATTR_KEY, destinationName)
7177
.put(PROJECT_ATTR_KEY, projectName)
72-
.put(SemanticAttributes.CODE_FUNCTION, codeFunction);
78+
.put(CODE_FUNCTION_ATTR_KEY, codeFunction);
7379
if (operation != null) {
74-
attributesBuilder.put(SemanticAttributes.MESSAGING_OPERATION, operation);
80+
attributesBuilder.put(MESSAGING_OPERATION_ATTR_KEY, operation);
7581
}
7682

7783
return attributesBuilder;
@@ -179,15 +185,15 @@ Span startPublishRpcSpan(TopicName topicName, List<PubsubMessageWrapper> message
179185
Attributes attributes =
180186
createCommonSpanAttributesBuilder(
181187
topicName.getTopic(), topicName.getProject(), "publishCall", "publish")
182-
.put(SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, messages.size())
188+
.put(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, messages.size())
183189
.build();
184190
SpanBuilder publishRpcSpanBuilder =
185191
tracer
186192
.spanBuilder(topicName.getTopic() + PUBLISH_RPC_SPAN_SUFFIX)
187193
.setSpanKind(SpanKind.CLIENT)
188194
.setAllAttributes(attributes);
189195
Attributes linkAttributes =
190-
Attributes.builder().put(SemanticAttributes.MESSAGING_OPERATION, "publish").build();
196+
Attributes.builder().put(MESSAGING_OPERATION_ATTR_KEY, "publish").build();
191197
for (PubsubMessageWrapper message : messages) {
192198
if (message.getPublisherSpan().getSpanContext().isSampled())
193199
publishRpcSpanBuilder.addLink(message.getPublisherSpan().getSpanContext(), linkAttributes);
@@ -237,7 +243,7 @@ void startSubscriberSpan(PubsubMessageWrapper message, boolean exactlyOnceDelive
237243
message.getSubscriptionName(), message.getSubscriptionProject(), "onResponse", null);
238244

239245
attributesBuilder
240-
.put(SemanticAttributes.MESSAGING_MESSAGE_ID, message.getMessageId())
246+
.put(MESSAGING_MESSAGE_ID_ATTR_KEY, message.getMessageId())
241247
.put(MESSAGE_SIZE_ATTR_KEY, message.getDataSize())
242248
.put(MESSAGE_ACK_ID_ATTR_KEY, message.getAckId())
243249
.put(MESSAGE_EXACTLY_ONCE_ATTR_KEY, exactlyOnceDeliveryEnabled);
@@ -336,8 +342,7 @@ void startSubscribeProcessSpan(PubsubMessageWrapper message) {
336342
if (subscriberSpan != null) {
337343
Span subscribeProcessSpan =
338344
startChildSpan(message.getSubscriptionName() + " process", subscriberSpan);
339-
subscribeProcessSpan.setAttribute(
340-
SemanticAttributes.MESSAGING_SYSTEM, MESSAGING_SYSTEM_VALUE);
345+
subscribeProcessSpan.setAttribute(MESSAGING_SYSTEM_ATTR_KEY, MESSAGING_SYSTEM_VALUE);
341346
Span publisherSpan = message.getPublisherSpan();
342347
if (publisherSpan != null) {
343348
subscribeProcessSpan.addLink(publisherSpan.getSpanContext());
@@ -373,7 +378,7 @@ Span startSubscribeRpcSpan(
373378
subscriptionName.getProject(),
374379
codeFunction,
375380
rpcOperation)
376-
.put(SemanticAttributes.MESSAGING_BATCH_MESSAGE_COUNT, messages.size());
381+
.put(MESSAGING_BATCH_MESSAGE_COUNT_ATTR_KEY, messages.size());
377382

378383
// Ack deadline and receipt modack are specific to the modack operation
379384
if (rpcOperation == "modack") {
@@ -388,7 +393,7 @@ Span startSubscribeRpcSpan(
388393
.setSpanKind(SpanKind.CLIENT)
389394
.setAllAttributes(attributesBuilder.build());
390395
Attributes linkAttributes =
391-
Attributes.builder().put(SemanticAttributes.MESSAGING_OPERATION, rpcOperation).build();
396+
Attributes.builder().put(MESSAGING_OPERATION_ATTR_KEY, rpcOperation).build();
392397
for (PubsubMessageWrapper message : messages) {
393398
if (message.getSubscriberSpan().getSpanContext().isSampled()) {
394399
rpcSpanBuilder.addLink(message.getSubscriberSpan().getSpanContext(), linkAttributes);

0 commit comments

Comments
 (0)