Skip to content

Commit 5dbca0f

Browse files
committed
./gradlew spotlessApply
1 parent f69e6b3 commit 5dbca0f

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

instrumentation/async-http-client/async-http-client-1-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common/AsyncHandlerData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
public abstract class AsyncHandlerData {
1616

1717
public static AsyncHandlerData create(
18-
Context parentContext,
19-
Context context,
20-
Request request,
18+
Context parentContext,
19+
Context context,
20+
Request request,
2121
Instrumenter<Request, Response> instrumenter) {
2222
return new AutoValue_AsyncHandlerData(parentContext, context, request, instrumenter);
2323
}

instrumentation/async-http-client/async-http-client-1-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common/AsyncHttpClientHelper.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
import javax.annotation.Nullable;
1010

1111
/**
12-
* Helper interface to abstract away differences between AsyncHttpClient versions.
13-
* This allows sharing common instrumentation code while handling version-specific API differences.
12+
* Helper interface to abstract away differences between AsyncHttpClient versions. This allows
13+
* sharing common instrumentation code while handling version-specific API differences.
1414
*/
1515
public interface AsyncHttpClientHelper {
1616

1717
/**
1818
* Get the full URL from the request.
19-
*
19+
*
2020
* @param request the HTTP request
2121
* @return the full URL as a string, or null if it cannot be determined
2222
*/
@@ -25,26 +25,26 @@ public interface AsyncHttpClientHelper {
2525

2626
/**
2727
* Get the server address (host) from the request.
28-
*
28+
*
2929
* @param request the HTTP request
3030
* @return the server address
3131
*/
3232
String getServerAddress(Request request);
3333

3434
/**
3535
* Get the server port from the request.
36-
*
36+
*
3737
* @param request the HTTP request
3838
* @return the server port
3939
*/
4040
Integer getServerPort(Request request);
4141

4242
/**
4343
* Set a header on the request.
44-
*
44+
*
4545
* @param request the HTTP request
4646
* @param key the header name
4747
* @param value the header value
4848
*/
4949
void setHeader(Request request, String key, String value);
50-
}
50+
}

instrumentation/async-http-client/async-http-client-1-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/common/ResponseInstrumentation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public static class OnCompletedAdvice {
5555
public static Scope onEnter(
5656
@Advice.This AsyncCompletionHandler<?> handler, @Advice.Argument(0) Response response) {
5757

58-
VirtualField<AsyncHandler<?>, AsyncHandlerData> asyncHandlerDataField =
58+
VirtualField<AsyncHandler<?>, AsyncHandlerData> asyncHandlerDataField =
5959
VirtualField.find(AsyncHandler.class, AsyncHandlerData.class);
6060
AsyncHandlerData data = asyncHandlerDataField.get(handler);
6161
if (data == null) {
6262
return null;
6363
}
6464
asyncHandlerDataField.set(handler, null);
65-
65+
6666
Instrumenter<Request, Response> instrumenter = data.getInstrumenter();
6767
if (instrumenter != null) {
6868
instrumenter.end(data.getContext(), data.getRequest(), response, null);
@@ -85,14 +85,14 @@ public static class OnThrowableAdvice {
8585
public static Scope onEnter(
8686
@Advice.This AsyncCompletionHandler<?> handler, @Advice.Argument(0) Throwable throwable) {
8787

88-
VirtualField<AsyncHandler<?>, AsyncHandlerData> asyncHandlerDataField =
88+
VirtualField<AsyncHandler<?>, AsyncHandlerData> asyncHandlerDataField =
8989
VirtualField.find(AsyncHandler.class, AsyncHandlerData.class);
9090
AsyncHandlerData data = asyncHandlerDataField.get(handler);
9191
if (data == null) {
9292
return null;
9393
}
9494
asyncHandlerDataField.set(handler, null);
95-
95+
9696
// Get instrumenter directly from data - much cleaner!
9797
Instrumenter<Request, Response> instrumenter = data.getInstrumenter();
9898
if (instrumenter != null) {

instrumentation/async-http-client/async-http-client-1.8/javaagent/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ muzzle {
1313

1414
dependencies {
1515
implementation(project(":instrumentation:async-http-client:async-http-client-1-common:javaagent"))
16-
16+
1717
library("com.ning:async-http-client:1.8.3")
1818

1919
compileOnly("com.google.auto.value:auto-value-annotations")

instrumentation/async-http-client/async-http-client-1.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_8/AsyncHttpProviderInstrumentation.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import io.opentelemetry.context.Scope;
2020
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
2121
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
22-
import javax.annotation.Nullable;
2322
import io.opentelemetry.javaagent.instrumentation.asynchttpclient.common.AsyncHandlerData;
23+
import javax.annotation.Nullable;
2424
import net.bytebuddy.asm.Advice;
2525
import net.bytebuddy.description.type.TypeDescription;
2626
import net.bytebuddy.matcher.ElementMatcher;
@@ -56,7 +56,8 @@ public static Scope onEnter(
5656
}
5757

5858
Context context = instrumenter().start(parentContext, request);
59-
ASYNC_HANDLER_DATA.set(handler, AsyncHandlerData.create(parentContext, context, request, instrumenter()));
59+
ASYNC_HANDLER_DATA.set(
60+
handler, AsyncHandlerData.create(parentContext, context, request, instrumenter()));
6061
return context.makeCurrent();
6162
}
6263

instrumentation/async-http-client/async-http-client-1.9/javaagent/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ muzzle {
1313

1414
dependencies {
1515
implementation(project(":instrumentation:async-http-client:async-http-client-1-common:javaagent"))
16-
16+
1717
library("com.ning:async-http-client:1.9.0")
1818

1919
compileOnly("com.google.auto.value:auto-value-annotations")

instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9/RequestInstrumentation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public static Scope onEnter(
5454
}
5555

5656
Context context = instrumenter().start(parentContext, request);
57-
ASYNC_HANDLER_DATA.set(handler, AsyncHandlerData.create(parentContext, context, request, instrumenter()));
57+
ASYNC_HANDLER_DATA.set(
58+
handler, AsyncHandlerData.create(parentContext, context, request, instrumenter()));
5859
return context.makeCurrent();
5960
}
6061

0 commit comments

Comments
 (0)