diff --git a/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentation.java b/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentation.java index 8a93e9bd753b..110af44af01f 100644 --- a/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentation.java +++ b/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentation.java @@ -38,13 +38,17 @@ public void transform(TypeTransformer transformer) { isMethod() .and(takesGenericArguments(iterableHasAtLeastOne(named("com.aerospike.client.Key")))) .and( - not(takesGenericArguments(iterableHasAtLeastOne(named("com.aerospike.client.async.EventLoop"))))), + not( + takesGenericArguments( + iterableHasAtLeastOne(named("com.aerospike.client.async.EventLoop"))))), this.getClass().getName() + "$SyncCommandAdvice"); transformer.applyAdviceToMethod( isMethod() .and(takesGenericArguments(iterableHasAtLeastOne(named("com.aerospike.client.Key")))) - .and(takesGenericArguments(iterableHasAtLeastOne(named("com.aerospike.client.async.EventLoop")))), + .and( + takesGenericArguments( + iterableHasAtLeastOne(named("com.aerospike.client.async.EventLoop")))), this.getClass().getName() + "$AsyncCommandAdvice"); } @@ -75,9 +79,7 @@ public static void startInstrumentation( requestContext = AerospikeRequestContext.attach(request, context); } - @Advice.OnMethodExit( - onThrowable = Throwable.class, - suppress = Throwable.class) + @Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class) public static void stopInstrumentation( @Advice.Thrown Throwable ex, @Advice.Local("AerospikeContext") AerospikeRequestContext requestContext) { @@ -113,9 +115,7 @@ public static void startInstrumentation( requestContext = AerospikeRequestContext.attach(request, context); } - @Advice.OnMethodExit( - onThrowable = Throwable.class, - suppress = Throwable.class) + @Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class) public static void stopInstrumentaionIfError( @Advice.Thrown Throwable ex, @Advice.Local("AerospikeContext") AerospikeRequestContext requestContext) { diff --git a/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentationModule.java b/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentationModule.java index ad6ec3a74b03..ad593c2a7cd8 100644 --- a/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentationModule.java +++ b/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AerospikeClientInstrumentationModule.java @@ -23,12 +23,12 @@ public AerospikeClientInstrumentationModule() { @Override public ElementMatcher.Junction classLoaderMatcher() { - return hasClassesNamed("com.aerospike.client.IAerospikeClient"). - and(hasClassesNamed("com.aerospike.client.command.Command")). - and(hasClassesNamed("com.aerospike.client.command.SyncCommand")). - and(hasClassesNamed("com.aerospike.client.async.AsyncCommand")). - and(hasClassesNamed("com.aerospike.client.async.EventLoop")). - and(hasClassesNamed("com.aerospike.client.Key")); + return hasClassesNamed("com.aerospike.client.IAerospikeClient") + .and(hasClassesNamed("com.aerospike.client.command.Command")) + .and(hasClassesNamed("com.aerospike.client.command.SyncCommand")) + .and(hasClassesNamed("com.aerospike.client.async.AsyncCommand")) + .and(hasClassesNamed("com.aerospike.client.async.EventLoop")) + .and(hasClassesNamed("com.aerospike.client.Key")); } @Override diff --git a/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AsyncCommandInstrumentation.java b/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AsyncCommandInstrumentation.java index 47d088a036a6..3c2b30ec8bac 100644 --- a/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AsyncCommandInstrumentation.java +++ b/instrumentation/aerospike-client/aerospike-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/aerospike/v7_0/AsyncCommandInstrumentation.java @@ -48,7 +48,10 @@ public void transform(TypeTransformer transformer) { isMethod().and(named("onSuccess")), this.getClass().getName() + "$GetOnSuccessAdvice"); transformer.applyAdviceToMethod( - isMethod().and(named("onFailure").and(takesArgument(0, named("com.aerospike.client.AerospikeException")))), + isMethod() + .and( + named("onFailure") + .and(takesArgument(0, named("com.aerospike.client.AerospikeException")))), this.getClass().getName() + "$GetOnFailureAdvice"); }