Package brave.mysql6

Class TracingStatementInterceptor

java.lang.Object
brave.mysql6.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 Summary

    Constructors 
    Constructor Description
    TracingStatementInterceptor()
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    void destroy()
    Deprecated.
     
    boolean executeTopLevelOnly()
    Deprecated.
     
    com.mysql.cj.api.jdbc.interceptors.StatementInterceptor init​(com.mysql.cj.api.MysqlConnection mysqlConnection, Properties properties, com.mysql.cj.api.log.Log log)
    Deprecated.
     
    <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.
     
    <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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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