Kamon icon indicating copy to clipboard operation
Kamon copied to clipboard

Add cardamo/play-logback-access to instrumentation whitelist

Open dominics opened this issue 6 years ago • 3 comments

play-logback-access project

It'd be good to add org.databrary.logback..* to the instrumentation within, to prevent errors such as:

[error] akka.dispatch.Dispatcher api-akka.actor.default-dispatcher-23 traceId=27f332fc950f016e - org.databrary.logback.PlayAccessEvent cannot be cast to kamon.instrumentation.context.HasContext
java.lang.ClassCastException: org.databrary.logback.PlayAccessEvent cannot be cast to kamon.instrumentation.context.HasContext
	at kamon.instrumentation.logback.AppendLoopMethodInterceptor$.aroundAppendLoop(LogbackInstrumentation.scala:83)
	at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java)
	at org.databrary.PlayLogbackAccess.log(plugin.scala:43)
[...]

Not sure how popular cardamo/play-logback-access is, or how popular a package should be to be added to the default within

dominics avatar Aug 26 '19 04:08 dominics

I've run into this issue too -- is there a config. setting or other workaround to prevent this?

ctoomey avatar Jun 24 '21 20:06 ctoomey

FYI I worked around it by not installing kamon-bundle, which automatically includes logback as well as a bunch of other instrumentations. Instead I install only the kamon-* packages I need.

ctoomey avatar Jun 25 '21 02:06 ctoomey

One workaround would have been to disable the logback module if you're not using it: kanela.modules.logback.enabled = false.

You can also add the within block, so Kamon knows where to look for the PlayAccessEvent: kanela.modules.logback.within = ["org.databrary.logback..*"]

Not sure how popular cardamo/play-logback-access is, or how popular a package should be to be added to the default within

It doesn't seem to be too popular, so we'll refrain from adding it for now, if some more people come across the same error, we'll add it to the configuration

SimunKaracic avatar Jun 28 '21 08:06 SimunKaracic