diff --git a/instrumentation/jdbc/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jdbc/JdbcDataSourceInstrumentationModule.java b/instrumentation/jdbc/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jdbc/JdbcDataSourceInstrumentationModule.java index 416be5569941..3a05123614e1 100644 --- a/instrumentation/jdbc/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jdbc/JdbcDataSourceInstrumentationModule.java +++ b/instrumentation/jdbc/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jdbc/JdbcDataSourceInstrumentationModule.java @@ -61,9 +61,9 @@ public static void start( @Advice.This DataSource ds, @Advice.Local("otelContext") Context context, @Advice.Local("otelScope") Scope scope) { - // TODO this is very strange condition if (!Java8BytecodeBridge.currentSpan().getSpanContext().isValid()) { - // Don't want to generate a new top-level span + // this instrumentation is already very noisy, and calls to getConnection outside of an + // existing trace do not tend to be very interesting return; }