Add comment to JDBC DataSource instrumentation (#2940)

This commit is contained in:
Trask Stalnaker 2021-05-11 09:52:42 -07:00 committed by GitHub
parent 871f9a0d24
commit 1086bce0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -61,9 +61,9 @@ public class JdbcDataSourceInstrumentationModule extends InstrumentationModule {
@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;
}