Skip to content

Commit 335daa4

Browse files
committed
./gradlew spotlessApply
1 parent 4097d39 commit 335daa4

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
plugins {
22
id("otel.javaagent-bootstrap")
3-
}
3+
}

instrumentation/camel-2.20/bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/apachecamel/ContextWithScope.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
package io.opentelemetry.javaagent.bootstrap.apachecamel;
27

3-
import javax.annotation.Nullable;
48
import io.opentelemetry.context.Context;
59
import io.opentelemetry.context.Scope;
6-
10+
import javax.annotation.Nullable;
11+
712
public class ContextWithScope {
813
@Nullable private final ContextWithScope parent;
914
@Nullable private final Context context;
1015
@Nullable private final Scope scope;
1116

12-
public ContextWithScope(
13-
ContextWithScope parent, Context context, Scope scope) {
17+
public ContextWithScope(ContextWithScope parent, Context context, Scope scope) {
1418
this.parent = parent;
1519
this.context = context;
1620
this.scope = scope;
@@ -40,4 +44,4 @@ public void deactivate() {
4044
public String toString() {
4145
return "ContextWithScope [context=" + context + ", scope=" + scope + "]";
4246
}
43-
}
47+
}

instrumentation/camel-2.20/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachecamel/ActiveContextManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
import static java.util.logging.Level.FINE;
2727

28-
import io.opentelemetry.javaagent.bootstrap.apachecamel.ContextWithScope;
2928
import io.opentelemetry.context.Context;
29+
import io.opentelemetry.javaagent.bootstrap.apachecamel.ContextWithScope;
3030
import java.util.logging.Logger;
3131
import org.apache.camel.Exchange;
3232

@@ -73,5 +73,4 @@ public static Context deactivate(Exchange exchange) {
7373

7474
return null;
7575
}
76-
7776
}

instrumentation/camel-2.20/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachecamel/CamelEventNotifier.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,8 @@ private static void onExchangeSent(ExchangeSentEvent event) {
8888
Exchange exchange = event.getExchange();
8989
Context context = ActiveContextManager.deactivate(exchange);
9090
CamelRequest request =
91-
CamelRequest.create(
92-
sd,
93-
exchange,
94-
event.getEndpoint(),
95-
CamelDirection.OUTBOUND,
96-
sd.getInitiatorSpanKind());
91+
CamelRequest.create(
92+
sd, exchange, event.getEndpoint(), CamelDirection.OUTBOUND, sd.getInitiatorSpanKind());
9793
instrumenter().end(context, request, null, exchange.getException());
9894
logger.log(FINE, "[Exchange sent] Initiator span finished: {0}", context);
9995
}

instrumentation/camel-2.20/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachecamel/CamelRoutePolicy.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public void onExchangeDone(Route route, Exchange exchange) {
8383
SpanDecorator sd = getSpanDecorator(route.getEndpoint());
8484
Context context = ActiveContextManager.deactivate(exchange);
8585
CamelRequest request =
86-
CamelRequest.create(sd, exchange, route.getEndpoint(), CamelDirection.INBOUND, SpanKind.INTERNAL);
86+
CamelRequest.create(
87+
sd, exchange, route.getEndpoint(), CamelDirection.INBOUND, SpanKind.INTERNAL);
8788
instrumenter().end(context, request, null, exchange.getException());
8889
logger.log(FINE, "[Route finished] Receiver span finished {0}", context);
8990
}

0 commit comments

Comments
 (0)