You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting reporter-queue-size to any different value than default '4096', Tracer.reconfigure is called, which reinstantiates kamon.trace.Tracer#_spanBuffer but kamon.trace.Tracer#_onSpanFinish keeps reference to its old value, which is what causes this issue. The _onSpanFinish lambda should be updated with the new reference of _spanBuffer
def reconfigure(newConfig: Config): Unit = synchronized {
//......
if(_traceReporterQueueSize != traceReporterQueueSize) {
// By simply changing the buffer we might be dropping Spans that have not been collected yet by the reporters.
// Since reconfigures are very unlikely to happen beyond application startup this might not be a problem.
// If we eventually decide to keep those possible Spans around then we will need to change the queue type to
// multiple consumer as the reconfiguring thread will need to drain the contents before replacing.
_spanBuffer = new MpscArrayQueue[Span.Finished](traceReporterQueueSize)
}
//......
}
The text was updated successfully, but these errors were encountered:
vvasilevbosch
changed the title
Trace reporting not working when setting reporter-queue-size to any number different than the default.
Trace reporting not working when setting reporter-queue-size to any value different than the default.
Jun 5, 2023
When setting reporter-queue-size to any different value than default '4096', Tracer.reconfigure is called, which reinstantiates kamon.trace.Tracer#_spanBuffer but kamon.trace.Tracer#_onSpanFinish keeps reference to its old value, which is what causes this issue. The _onSpanFinish lambda should be updated with the new reference of _spanBuffer
Kamon/core/kamon-core/src/main/scala/kamon/trace/Tracer.scala
Line 60 in c3f0655
https://github.com/kamon-io/Kamon/blob/c3f065517f046f6feffb47652a9ac91d664f160b/core/kamon-core/src/main/scala/kamon/trace/Tracer.scala#L459C1-L465
The text was updated successfully, but these errors were encountered: