Skip to content

Commit e11e6d2

Browse files
committed
try
1 parent fc0b070 commit e11e6d2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/db/SqlClientAttributesExtractor.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ public void onStart(AttributesBuilder attributes, Context parentContext, REQUEST
141141
}
142142
}
143143

144-
// calling this last so explicit getDbOperationName(), getDbCollectionName(),
145-
// getDbQueryText(), and getDbQuerySummary() implementations can override
146-
// the parsed values from above
147-
DbClientAttributesExtractor.onStartCommon(attributes, getter, request, captureQueryParameters);
144+
if (emitOldDatabaseSemconv()) {
145+
// calling this last so explicit getDbOperationName(), getDbCollectionName(),
146+
// getDbQueryText(), and getDbQuerySummary() implementations can override
147+
// the parsed values from above
148+
DbClientAttributesExtractor.onStartCommon(attributes, getter, request, captureQueryParameters);
149+
}
148150
serverAttributesExtractor.onStart(attributes, parentContext, request);
149151
}
150152

0 commit comments

Comments
 (0)