Skip to content

Commit

Permalink
feat: Lint fixes for Pub/Sub
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpri10 committed Sep 25, 2024
1 parent fe4753f commit a08d169
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ void setPublishRpcSpanException(Span publishRpcSpan, Throwable t) {
}
}

void startSubscriberSpan(
PubsubMessageWrapper message, boolean exactlyOnceDeliveryEnabled) {
void startSubscriberSpan(PubsubMessageWrapper message, boolean exactlyOnceDeliveryEnabled) {
if (!enabled) {
return;
}
Expand Down Expand Up @@ -275,8 +274,7 @@ void setSubscriberSpanExpirationResult(PubsubMessageWrapper message) {
message.setSubscriberSpanExpirationResult();
}

void setSubscriberSpanException(
PubsubMessageWrapper message, Throwable t, String exception) {
void setSubscriberSpanException(PubsubMessageWrapper message, Throwable t, String exception) {
if (!enabled) {
return;
}
Expand All @@ -302,8 +300,7 @@ void endSubscribeConcurrencyControlSpan(PubsubMessageWrapper message) {
message.endSubscribeConcurrencyControlSpan();
}

void setSubscribeConcurrencyControlSpanException(
PubsubMessageWrapper message, Throwable t) {
void setSubscribeConcurrencyControlSpanException(PubsubMessageWrapper message, Throwable t) {
if (!enabled) {
return;
}
Expand Down Expand Up @@ -434,8 +431,7 @@ void endSubscribeRpcSpan(Span rpcSpan) {
* Sets an error status and records an exception when an exception is thrown when handling a
* subscribe-side RPC.
*/
void setSubscribeRpcSpanException(
Span rpcSpan, boolean isModack, int ackDeadline, Throwable t) {
void setSubscribeRpcSpanException(Span rpcSpan, boolean isModack, int ackDeadline, Throwable t) {
if (!enabled) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ private Publisher(Builder builder) throws IOException {
if (this.openTelemetry != null && this.enableOpenTelemetryTracing) {
Tracer openTelemetryTracer = builder.openTelemetry.getTracer(OPEN_TELEMETRY_TRACER_NAME);
if (openTelemetryTracer != null) {
this.tracer = new OpenTelemetryPubsubTracer(openTelemetryTracer, this.enableOpenTelemetryTracing);
this.tracer =
new OpenTelemetryPubsubTracer(openTelemetryTracer, this.enableOpenTelemetryTracing);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public class Subscriber extends AbstractApiService implements SubscriberInterfac

private final boolean enableOpenTelemetryTracing;
private final OpenTelemetry openTelemetry;
private OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(null, false);
private OpenTelemetryPubsubTracer tracer = new OpenTelemetryPubsubTracer(null, false);

private Subscriber(Builder builder) {
receiver = builder.receiver;
Expand Down Expand Up @@ -212,7 +212,8 @@ private Subscriber(Builder builder) {
if (this.openTelemetry != null && this.enableOpenTelemetryTracing) {
Tracer openTelemetryTracer = builder.openTelemetry.getTracer(OPEN_TELEMETRY_TRACER_NAME);
if (openTelemetryTracer != null) {
this.tracer = new OpenTelemetryPubsubTracer(openTelemetryTracer, this.enableOpenTelemetryTracing);
this.tracer =
new OpenTelemetryPubsubTracer(openTelemetryTracer, this.enableOpenTelemetryTracing);
}
}

Expand Down

0 comments on commit a08d169

Please sign in to comment.