Interface SqlClientAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
DbClientAttributesGetter<REQUEST,,RESPONSE> DbClientCommonAttributesGetter<REQUEST,,RESPONSE> io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter<REQUEST,,RESPONSE> io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter<REQUEST>
public interface SqlClientAttributesGetter<REQUEST,RESPONSE>
extends DbClientAttributesGetter<REQUEST,RESPONSE>
An interface for getting SQL database client attributes.
Instrumentation authors will create implementations of this interface for their specific
library/framework. It will be used by the SqlClientAttributesExtractor to obtain the
various SQL 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 LonggetBatchSize(REQUEST request) default StringgetDbOperationName(REQUEST request) SqlClientAttributesExtractor will try to populate db.operation.name based ongetRawQueryTexts(REQUEST), but this can be used to explicitly provide the operation name.default StringgetDbQuerySummary(REQUEST request) SqlClientAttributesExtractor will try to populate db.query.summary based ongetRawQueryTexts(REQUEST), but this can be used to explicitly provide the query summary.default StringgetDbQueryText(REQUEST request) SqlClientAttributesExtractor will try to populate db.query.text based ongetRawQueryTexts(REQUEST), but this can be used to explicitly provide the query text.getQueryParameters(REQUEST request) getRawQueryTexts(REQUEST request) Get the raw SQL query texts.Methods inherited from interface io.opentelemetry.instrumentation.api.incubator.semconv.db.DbClientAttributesGetter
getOperation, getStatementMethods 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
-
getDbOperationName
SqlClientAttributesExtractor will try to populate db.operation.name based ongetRawQueryTexts(REQUEST), but this can be used to explicitly provide the operation name.- Specified by:
getDbOperationNamein interfaceDbClientAttributesGetter<REQUEST,RESPONSE>
-
getDbQueryText
SqlClientAttributesExtractor will try to populate db.query.text based ongetRawQueryTexts(REQUEST), but this can be used to explicitly provide the query text.- Specified by:
getDbQueryTextin interfaceDbClientAttributesGetter<REQUEST,RESPONSE>
-
getDbQuerySummary
SqlClientAttributesExtractor will try to populate db.query.summary based ongetRawQueryTexts(REQUEST), but this can be used to explicitly provide the query summary.- Specified by:
getDbQuerySummaryin interfaceDbClientAttributesGetter<REQUEST,RESPONSE>
-
getRawQueryTexts
Get the raw SQL query texts. The values returned by this method are later sanitized by theSqlClientAttributesExtractorbefore being set as span attribute.If
requestis not a batch query, then this method should return a collection with a single element. -
getBatchSize
-
getQueryParameters
-