Interface DbClientAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
DbClientCommonAttributesGetter<REQUEST,,RESPONSE> io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter<REQUEST,,RESPONSE> io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter<REQUEST>
- All Known Subinterfaces:
SqlClientAttributesGetter<REQUEST,RESPONSE>
public interface DbClientAttributesGetter<REQUEST,RESPONSE>
extends DbClientCommonAttributesGetter<REQUEST,RESPONSE>, io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter<REQUEST,RESPONSE>, io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter<REQUEST>
An interface for getting database client attributes.
Instrumentation authors will create implementations of this interface for their specific
library/framework. It will be used by the DbClientAttributesExtractor to obtain the
various database client attributes in a type-generic way.
If an attribute is not available in this library, it is appropriate to return null
from the attribute methods, but implement as many as possible for best compliance with the
OpenTelemetry specification.
-
Method Summary
Modifier and TypeMethodDescriptiondefault LonggetDbOperationBatchSize(REQUEST request) default StringgetDbOperationName(REQUEST request) getDbQueryParameters(REQUEST request) default StringgetDbQuerySummary(REQUEST request) default StringgetDbQueryText(REQUEST request) default StringgetDbResponseStatusCode(RESPONSE response, Throwable error) default StringgetDbSystemName(REQUEST request) default StringgetOperation(REQUEST request) Deprecated.default StringgetResponseStatusCode(RESPONSE response, Throwable error) Deprecated.UsegetDbResponseStatusCode(RESPONSE, Throwable)instead.default StringgetStatement(REQUEST request) Deprecated.UsegetDbQueryText(REQUEST)instead.Methods inherited from interface io.opentelemetry.instrumentation.api.incubator.semconv.db.DbClientCommonAttributesGetter
getConnectionString, getDbNamespace, getDbSystem, getResponseStatus, getUserMethods inherited from interface io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter
getNetworkLocalAddress, getNetworkLocalInetSocketAddress, getNetworkLocalPort, getNetworkPeerAddress, getNetworkPeerInetSocketAddress, getNetworkPeerPort, getNetworkProtocolName, getNetworkProtocolVersion, getNetworkTransport, getNetworkTypeMethods inherited from interface io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter
getServerAddress, getServerPort
-
Method Details
-
getStatement
Deprecated.UsegetDbQueryText(REQUEST)instead. -
getDbQueryText
-
getDbQuerySummary
-
getOperation
Deprecated.UsegetDbOperationName(REQUEST)instead. -
getDbOperationName
-
getDbSystemName
-
getResponseStatusCode
@Deprecated @Nullable default String getResponseStatusCode(@Nullable RESPONSE response, @Nullable Throwable error) Deprecated.UsegetDbResponseStatusCode(RESPONSE, Throwable)instead. -
getDbResponseStatusCode
-
getDbOperationBatchSize
-
getDbQueryParameters
-
getDbOperationName(REQUEST)instead.