Package brave.mysql6

Class TracingStatementInterceptor

  • All Implemented Interfaces:
    com.mysql.cj.api.jdbc.interceptors.StatementInterceptor

    @Deprecated
    public class TracingStatementInterceptor
    extends Object
    implements com.mysql.cj.api.jdbc.interceptors.StatementInterceptor
    Deprecated.
    mysql-connector-java v6 is not a long term release. Please upgrade to version 8
    A MySQL statement interceptor that will report to Zipkin how long each statement takes.

    To use it, append ?statementInterceptors=brave.mysql6.TracingStatementInterceptor to the end of the connection url.

    • Constructor Detail

      • TracingStatementInterceptor

        public TracingStatementInterceptor()
        Deprecated.
    • Method Detail

      • preProcess

        public <T extends com.mysql.cj.api.mysqla.result.Resultset> T preProcess​(String sql,
                                                                                 com.mysql.cj.api.jdbc.Statement interceptedStatement)
        Deprecated.
        Uses ThreadLocalSpan as there's no attribute namespace shared between callbacks, but all callbacks happen on the same thread.

        Uses ThreadLocalSpan.CURRENT_TRACER and this interceptor initializes before tracing.

        Specified by:
        preProcess in interface com.mysql.cj.api.jdbc.interceptors.StatementInterceptor
      • postProcess

        public <T extends com.mysql.cj.api.mysqla.result.Resultset> T postProcess​(String sql,
                                                                                  com.mysql.cj.api.jdbc.Statement interceptedStatement,
                                                                                  T originalResultSet,
                                                                                  int warningCount,
                                                                                  boolean noIndexUsed,
                                                                                  boolean noGoodIndexUsed,
                                                                                  Exception error)
        Deprecated.
        Specified by:
        postProcess in interface com.mysql.cj.api.jdbc.interceptors.StatementInterceptor
      • executeTopLevelOnly

        public boolean executeTopLevelOnly()
        Deprecated.
        Specified by:
        executeTopLevelOnly in interface com.mysql.cj.api.jdbc.interceptors.StatementInterceptor
      • init

        public com.mysql.cj.api.jdbc.interceptors.StatementInterceptor init​(com.mysql.cj.api.MysqlConnection mysqlConnection,
                                                                            Properties properties,
                                                                            com.mysql.cj.api.log.Log log)
        Deprecated.
        Specified by:
        init in interface com.mysql.cj.api.jdbc.interceptors.StatementInterceptor
      • destroy

        public void destroy()
        Deprecated.
        Specified by:
        destroy in interface com.mysql.cj.api.jdbc.interceptors.StatementInterceptor