mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IJI-1607 OpenTelemetry spans flush disabled by default in build scripts due to deadlock
GitOrigin-RevId: febd26b489e764407b6cd53202c890811e6934bc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0a97bb9e3c
commit
381f23b390
@@ -42,6 +42,7 @@ var traceManagerInitializer: () -> Pair<Tracer, BatchSpanProcessor> = {
|
||||
object TraceManager {
|
||||
private val tracer: Tracer
|
||||
private val batchSpanProcessor: BatchSpanProcessor
|
||||
private val isEnabled = System.getProperty("intellij.build.export.opentelemetry.spans")?.toBoolean() ?: false
|
||||
|
||||
init {
|
||||
val config = traceManagerInitializer()
|
||||
@@ -60,7 +61,9 @@ object TraceManager {
|
||||
}
|
||||
|
||||
suspend fun exportPendingSpans() {
|
||||
batchSpanProcessor.doFlush(exportOnly = true)
|
||||
if (isEnabled) {
|
||||
batchSpanProcessor.doFlush(exportOnly = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user