Skip to content

Commit d308b2b

Browse files
traskSylvainJuge
andauthored
Apply suggestions from code review
Co-authored-by: SylvainJuge <[email protected]>
1 parent d95c3ac commit d308b2b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

instrumentation/lettuce/lettuce-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceAsyncCommandsInstrumentation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public static AdviceScope onEnter(@Advice.Argument(0) RedisCommand<?, ?, ?> comm
7676
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
7777
public static void onExit(
7878
@Advice.Argument(0) RedisCommand<?, ?, ?> command,
79-
@Advice.Thrown Throwable throwable,
80-
@Advice.Return AsyncCommand<?, ?, ?> asyncCommand,
81-
@Advice.Enter AdviceScope adviceScope) {
79+
@Advice.Thrown @Nullable Throwable throwable,
80+
@Advice.Return @Nullable AsyncCommand<?, ?, ?> asyncCommand,
81+
@Advice.Enter @Nullable AdviceScope adviceScope) {
8282
if (adviceScope != null) {
8383
adviceScope.end(throwable, command, asyncCommand);
8484
}

instrumentation/lettuce/lettuce-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceConnectInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static AdviceScope onEnter(@Advice.Argument(1) RedisURI redisUri) {
6767
public static void onExit(
6868
@Advice.Argument(1) RedisURI redisUri,
6969
@Advice.Thrown @Nullable Throwable throwable,
70-
@Advice.Enter AdviceScope adviceScope) {
70+
@Advice.Enter @Nullable AdviceScope adviceScope) {
7171
if (adviceScope != null) {
7272
adviceScope.end(throwable, redisUri);
7373
}

instrumentation/lettuce/lettuce-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_0/LettuceAsyncCommandsInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public static AdviceScope onEnter(@Advice.Argument(0) RedisCommand<?, ?, ?> comm
8989
public static void stopSpan(
9090
@Advice.Argument(0) RedisCommand<?, ?, ?> command,
9191
@Advice.Thrown @Nullable Throwable throwable,
92-
@Advice.Return AsyncCommand<?, ?, ?> asyncCommand,
93-
@Advice.Enter AdviceScope adviceScope) {
92+
@Advice.Return @Nullable AsyncCommand<?, ?, ?> asyncCommand,
93+
@Advice.Enter @Nullable AdviceScope adviceScope) {
9494

9595
if (adviceScope != null) {
9696
adviceScope.end(throwable, command, asyncCommand);

instrumentation/lettuce/lettuce-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_0/LettuceClientInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public static AdviceScope onEnter(@Advice.Argument(1) RedisURI redisUri) {
8585
public static void stopSpan(
8686
@Advice.Argument(1) RedisURI redisUri,
8787
@Advice.Thrown @Nullable Throwable throwable,
88-
@Advice.Return ConnectionFuture<?> connectionFuture,
89-
@Advice.Enter AdviceScope adviceScope) {
88+
@Advice.Return @Nullable ConnectionFuture<?> connectionFuture,
89+
@Advice.Enter @Nullable AdviceScope adviceScope) {
9090
if (adviceScope != null) {
9191
adviceScope.end(throwable, redisUri, connectionFuture);
9292
}

0 commit comments

Comments
 (0)