We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b1b1da commit 641935cCopy full SHA for 641935c
instrumentation/kamon-redis/src/main/scala/kamon/instrumentation/jedis/JedisInstrumentation.scala
@@ -18,19 +18,18 @@ object SendCommandAdvice {
18
command match {
19
case command: ProtocolCommand =>
20
val spanName = s"redis.command.${command}"
21
- Some(Kamon.clientSpanBuilder(spanName, "redis.client.jedis")
22
- .start())
23
- case _ => None
+ Kamon.clientSpanBuilder(spanName, "redis.client.jedis")
+ .start()
+ case _ => Span.Empty
24
}
25
26
27
@Advice.OnMethodExit(onThrowable = classOf[Throwable])
28
- def exit(@Advice.Enter span: Option[Span],
+ def exit(@Advice.Enter span: Span,
29
@Advice.Thrown t: Throwable) = {
30
-
31
if (t != null) {
32
- span.map(_.fail(t))
+ span.fail(t)
33
34
- span.map(_.finish())
+ span.finish()
35
36
0 commit comments