Class DatabaseClientTracer<CONNECTION,​STATEMENT,​SANITIZEDSTATEMENT>

  • Type Parameters:
    CONNECTION - type of the database connection.
    STATEMENT - type of the database statement being executed.
    SANITIZEDSTATEMENT - type of the database statement after sanitization.

    @Deprecated
    public abstract class DatabaseClientTracer<CONNECTION,​STATEMENT,​SANITIZEDSTATEMENT>
    extends BaseTracer
    Base class for implementing Tracers for database clients.
    • Field Detail

    • Constructor Detail

      • DatabaseClientTracer

        protected DatabaseClientTracer​(NetPeerAttributes netPeerAttributes)
        Deprecated.
      • DatabaseClientTracer

        protected DatabaseClientTracer​(io.opentelemetry.api.OpenTelemetry openTelemetry,
                                       NetPeerAttributes netPeerAttributes)
        Deprecated.
    • Method Detail

      • shouldStartSpan

        public boolean shouldStartSpan​(io.opentelemetry.context.Context parentContext)
        Deprecated.
      • startSpan

        public io.opentelemetry.context.Context startSpan​(io.opentelemetry.context.Context parentContext,
                                                          CONNECTION connection,
                                                          STATEMENT statement)
        Deprecated.
      • conventionSpanName

        public static String conventionSpanName​(@Nullable
                                                String dbName,
                                                @Nullable
                                                String operation,
                                                @Nullable
                                                String table)
        Deprecated.
        A helper method for constructing the span name formatting according to DB semantic conventions: <db.operation> <db.name><table>.
      • conventionSpanName

        public static String conventionSpanName​(@Nullable
                                                String dbName,
                                                @Nullable
                                                String operation,
                                                @Nullable
                                                String table,
                                                String defaultValue)
        Deprecated.
        A helper method for constructing the span name formatting according to DB semantic conventions: <db.operation> <db.name><table>. If dbName and operation are not provided then defaultValue is returned.
      • dbSystem

        protected abstract String dbSystem​(CONNECTION connection)
        Deprecated.
      • onConnection

        protected void onConnection​(io.opentelemetry.api.trace.SpanBuilder span,
                                    CONNECTION connection)
        Deprecated.
        This should be called when the connection is being used, not when it's created.
      • setNetSemanticConvention

        protected void setNetSemanticConvention​(io.opentelemetry.api.trace.SpanBuilder span,
                                                CONNECTION connection)
        Deprecated.
      • onStatement

        protected void onStatement​(io.opentelemetry.api.trace.SpanBuilder span,
                                   CONNECTION connection,
                                   STATEMENT statement,
                                   SANITIZEDSTATEMENT sanitizedStatement)
        Deprecated.