Interface DbClientAttributesGetter<REQUEST,RESPONSE>
- All Superinterfaces:
DbClientCommonAttributesGetter<REQUEST,RESPONSE>
public interface DbClientAttributesGetter<REQUEST,RESPONSE>
extends DbClientCommonAttributesGetter<REQUEST,RESPONSE>
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 StringgetDbOperationName(REQUEST request) default StringgetDbQueryText(REQUEST request) default StringgetOperation(REQUEST request) Deprecated.default StringgetStatement(REQUEST request) Deprecated.UsegetDbQueryText(REQUEST)instead.Methods inherited from interface io.opentelemetry.instrumentation.api.incubator.semconv.db.DbClientCommonAttributesGetter
getConnectionString, getDbNamespace, getDbSystem, getName, getResponseStatus, getSystem, getUser
-
Method Details
-
getStatement
Deprecated.UsegetDbQueryText(REQUEST)instead. -
getDbQueryText
-
getOperation
Deprecated.UsegetDbOperationName(REQUEST)instead. -
getDbOperationName
-
getDbOperationName(REQUEST)instead.