Class SqlQuery
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.db.SqlQuery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SqlQueryCreates a SqlQuery for old semconv (no querySummary).static SqlQuerycreateWithSummary(String queryText, String storedProcedureName, String querySummary) Creates a SqlQuery for stable semconv (uses querySummary).abstract StringDeprecated.abstract StringDeprecated.abstract StringReturns a low cardinality summary of the database query suitable for use as a span name or metric attribute.abstract Stringabstract StringReturns the stored procedure name for CALL operations, or null for other operations.
-
Constructor Details
-
SqlQuery
public SqlQuery()
-
-
Method Details
-
createWithSummary
public static SqlQuery createWithSummary(@Nullable String queryText, @Nullable String storedProcedureName, @Nullable String querySummary) Creates a SqlQuery for stable semconv (uses querySummary). -
create
public static SqlQuery create(@Nullable String queryText, @Nullable String operationName, @Nullable String target) Creates a SqlQuery for old semconv (no querySummary). Package-private for backward compatibility with old jflex-generated sanitizer. -
getQueryText
-
getOperationName
Deprecated. -
getCollectionName
Deprecated.Returns the table/collection name, or null for CALL operations.- See Also:
-
getStoredProcedureName
Returns the stored procedure name for CALL operations, or null for other operations. -
getQuerySummary
Returns a low cardinality summary of the database query suitable for use as a span name or metric attribute.The summary contains operations (e.g., SELECT, INSERT) and their targets (e.g., table names) in the order they appear in the query. For example:
SELECT wuser_tableINSERT shipping_details SELECT ordersSELECT songs artists(multiple tables)
- See Also:
-