Closed bwiercinski closed 2 years ago
Need to change the configuration (disable MDC context)
kamon.instrumentation.logback.mdc.copy.enabled = false
to work with logback-classic 1.4.3.
The recent logback commit - https://github.com/qos-ch/logback/commit/7e3e2ae770c19724b0714c7f48fd33bbc6791c7e - updated the method getCopyOfContextMap() to call getPropertyMap().
Cheers
so kamon will still be using logback 1.2.x and i need to wait for the newest logback-classic update right?
1.4.4 seems not to work either
Running with Kanela, the Kamon Instrumentation Agent :: (v1.0.15)
17:17:42,094 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.4.4
17
...
<the same stack trace>
so kamon will still be using logback 1.2.x and i need to wait for the newest logback-classic update right?
If you don't use the MDC context in the log, you can update the configuration
kamon.instrumentation.logback.mdc.copy.enabled = false
to use logback 1.4.3+.
Cheers
Same problem here
@e2000y i dont understand you. the issue is about having both the newest version of logback and kamon logback with its ALL FEATURES.
Yes. Advize to disable this feature is non sense
Hey @bwiercinski @Dichotomia, could you please share a bit more information to reproduce?
I tried to run on a simple app with Kamon 2.5.9 and logback 1.4.4 and couldn't see any issue. I'm guessing there has to be something else on your classpath or logback configuration that triggers the issue :confused:
I have a log like that
`OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/opt/docker/lib/com.google.inject.guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Oops, cannot start the server. com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Error injecting method, java.lang.StackOverflowError at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:154) at play.api.db.DBModule$$anonfun$$lessinit$greater$1.$anonfun$new$1(DBModule.scala:28): Binding(interface play.api.db.Database qualified with QualifierInstance(@play.db.NamedDatabase(value=conversations-whatsapp)) to ProviderTarget(play.api.db.NamedDatabaseProvider@752ffce3)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:554)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:111)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:78)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:200)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:155)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:53)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:29)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)
Caused by: java.lang.StackOverflowError
at ch.qos.logback.classic.util.LogbackMDCAdapter$auxiliary$6s3mPISd.
Play 2.8.18 Scala 2.13.10 Akka 2.6.20 Openjdk11-jre logback-classic 1.4.2 tika-java7 2.5.0 log4j-to-slf4j 2.19.0 kamon-bundle 2.5.9 kamon-prometheus 2.5.9
Thanks @Dichotomia! Turns out I didn't have the instrumentation running on my test app, that's why it didn't blow up :facepalm:
I'm looking into this right now. Will update soon!
Thanks! Good news. Waiting for the new release 😉
kamon-logback
module seems not to work with newest version oflogback
(1.4.3).when starting an application i get following error:
cheers