Interface SqlClientAttributesGetter<REQUEST>
- All Superinterfaces:
DbClientCommonAttributesGetter<REQUEST>
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 StringgetRawStatement(REQUEST request) Get the raw SQL statement.default StringrawStatement(REQUEST request) Deprecated.Methods inherited from interface io.opentelemetry.instrumentation.api.instrumenter.db.DbClientCommonAttributesGetter
connectionString, getConnectionString, getName, getSystem, getUser, name, system, user
-
Method Details
-
getRawStatement
Get the raw SQL statement. The value returned by this method is later sanitized by theSqlClientAttributesExtractorbefore being set as span attribute. -
rawStatement
Deprecated.UsegetRawStatement(Object)instead.Get the raw SQL statement. The value returned by this method is later sanitized by theSqlClientAttributesExtractorbefore being set as span attribute.This method is deprecated and will be removed in the subsequent release.
-
getRawStatement(Object)instead.