java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.db.internal.SqlCommenter

public final class SqlCommenter extends Object
This class is internal and experimental. Its APIs are unstable and can change at any time. Its APIs (or a version of them) may be promoted to the public stable API in the future, but no guarantees are made.
  • Method Details

    • builder

      public static SqlCommenterBuilder builder()
    • noop

      public static SqlCommenter noop()
    • processQuery

      public String processQuery(Object connection, String sql, boolean executed)
      Augments the given SQL query with comment containing tracing context.
      Parameters:
      connection - connection object, e.g. JDBC connection or R2DBC connection, that is used to execute the query
      sql - original query
      executed - whether the query is immediately executed after being processed, e.g. Statement.execute(String), or may be executed later, e.g. Connection.prepareStatement(String)
      Returns:
      modified query
    • isEnabled

      public boolean isEnabled()