File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
internal-logging/src/main/java/co/elastic/otel/logging Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,12 @@ public static void init() {
7171 public static void addSpanLoggingIfRequired (
7272 SdkTracerProviderBuilder providerBuilder , ConfigProperties config ) {
7373
74- boolean otelDebug = config .getBoolean (OTEL_JAVAAGENT_DEBUG , false );
75-
76- // Replicate behavior of upstream agent: span logging exporter is automatically added
77- // when not already present when debugging.
78- // When logging exporter has been explicitly configured, spans logging will be done by the
79- // explicitly configured logging exporter instance
74+ // Replicate behavior of the upstream agent: span logging exporter is automatically added when
75+ // not already present when debugging. When logging exporter has been explicitly configured,
76+ // spans logging will be done by the explicitly configured logging exporter instance.
8077 boolean loggingExporterNotAlreadyConfigured =
8178 !config .getList ("otel.traces.exporter" , emptyList ()).contains ("logging" );
82- if (otelDebug && loggingExporterNotAlreadyConfigured ) {
79+ if (loggingExporterNotAlreadyConfigured ) {
8380 providerBuilder .addSpanProcessor (SimpleSpanProcessor .create (debugLogSpanExporter ));
8481 }
8582 }
You can’t perform that action at this time.
0 commit comments