Skip to content

Commit

Permalink
fix: Fix build errors in Publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpri10 committed Jul 2, 2024
1 parent b0e0424 commit e21a9f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ public ApiFuture<String> publish(PubsubMessage message) {

PubsubMessageWrapper messageWrapper =
PubsubMessageWrapper.newBuilder(
messageTransform.apply(message),
TopicName.parse(topicName),
enableOpenTelemetryTracing)
messageTransform.apply(message), topicName, enableOpenTelemetryTracing)
.build();
messageWrapper.startPublisherSpan(tracer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public void testPublishSpansSuccess() {
openTelemetryTesting.clearSpans();

PubsubMessageWrapper messageWrapper =
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME, true).build();
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString(), true)
.build();
List<PubsubMessageWrapper> messageWrappers = Arrays.asList(messageWrapper);

long messageSize = messageWrapper.getPubsubMessage().getData().size();
Expand Down Expand Up @@ -182,7 +183,8 @@ public void testPublishFlowControlSpanFailure() {
openTelemetryTesting.clearSpans();

PubsubMessageWrapper messageWrapper =
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME, true).build();
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString(), true)
.build();

Tracer tracer = openTelemetryTesting.getOpenTelemetry().getTracer("test");

Expand Down Expand Up @@ -221,7 +223,8 @@ public void testPublishBatchingSpanFailure() {
openTelemetryTesting.clearSpans();

PubsubMessageWrapper messageWrapper =
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME, true).build();
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString(), true)
.build();

Tracer tracer = openTelemetryTesting.getOpenTelemetry().getTracer("test");

Expand Down Expand Up @@ -259,7 +262,8 @@ public void testPublishRpcSpanFailure() {
openTelemetryTesting.clearSpans();

PubsubMessageWrapper messageWrapper =
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME, true).build();
PubsubMessageWrapper.newBuilder(getPubsubMessage(), FULL_TOPIC_NAME.toString(), true)
.build();

List<PubsubMessageWrapper> messageWrappers = Arrays.asList(messageWrapper);
Tracer tracer = openTelemetryTesting.getOpenTelemetry().getTracer("test");
Expand Down

0 comments on commit e21a9f0

Please sign in to comment.