Class DbClientAttributesExtractor<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.db.DbClientAttributesExtractor<REQUEST,RESPONSE>
- All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,,RESPONSE> io.opentelemetry.instrumentation.api.internal.SpanKeyProvider
Extractor of database
client attributes.
This class delegates to a type-specific DbClientAttributesGetter for individual
attribute extraction from request/response objects.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST,RESPONSE>
io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST, RESPONSE> create(DbClientAttributesGetter<REQUEST, RESPONSE> getter) Creates the database client attributes extractor with default configuration.io.opentelemetry.instrumentation.api.internal.SpanKeyThis method is internal and is hence not for public use.final voidonEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, REQUEST request, RESPONSE response, Throwable error) voidonStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request)
-
Field Details
-
DB_SYSTEM_NAME
-
-
Method Details
-
create
public static <REQUEST,RESPONSE> io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE> create(DbClientAttributesGetter<REQUEST, RESPONSE> getter) Creates the database client attributes extractor with default configuration. -
onStart
public void onStart(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, REQUEST request) -
onEnd
public final void onEnd(io.opentelemetry.api.common.AttributesBuilder attributes, io.opentelemetry.context.Context context, REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error) - Specified by:
onEndin interfaceio.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE>
-
internalGetSpanKey
public io.opentelemetry.instrumentation.api.internal.SpanKey internalGetSpanKey()This method is internal and is hence not for public use. Its API is unstable and can change at any time.- Specified by:
internalGetSpanKeyin interfaceio.opentelemetry.instrumentation.api.internal.SpanKeyProvider
-