File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
instrumentation/kamon-redis/src/main/scala/kamon/instrumentation/jedis Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,18 @@ object SendCommandAdvice {
18
18
command match {
19
19
case command : ProtocolCommand =>
20
20
val spanName = s " redis.command. ${command}"
21
- Some ( Kamon .clientSpanBuilder(spanName, " redis.client.jedis" )
22
- .start())
23
- case _ => None
21
+ Kamon .clientSpanBuilder(spanName, " redis.client.jedis" )
22
+ .start()
23
+ case _ => Span . Empty
24
24
}
25
25
}
26
26
27
27
@ Advice .OnMethodExit (onThrowable = classOf [Throwable ])
28
- def exit (@ Advice .Enter span : Option [ Span ] ,
28
+ def exit (@ Advice .Enter span : Span ,
29
29
@ Advice .Thrown t : Throwable ) = {
30
-
31
30
if (t != null ) {
32
- span.map(_. fail(t) )
31
+ span.fail(t)
33
32
}
34
- span.map(_. finish() )
33
+ span.finish()
35
34
}
36
35
}
You can’t perform that action at this time.
0 commit comments