Class TraceJdbcEventListener

  • All Implemented Interfaces:
    org.springframework.core.Ordered

    public class TraceJdbcEventListener
    extends com.p6spy.engine.event.SimpleJdbcEventListener
    implements org.springframework.core.Ordered
    Listener to represent each connection and sql query as a span.
    Since:
    3.1.0
    Author:
    Arthur Gavlyukovskiy
    • Method Detail

      • onBeforeGetConnection

        public void onBeforeGetConnection​(com.p6spy.engine.common.ConnectionInformation connectionInformation)
        Overrides:
        onBeforeGetConnection in class com.p6spy.engine.event.JdbcEventListener
      • onAfterGetConnection

        public void onAfterGetConnection​(com.p6spy.engine.common.ConnectionInformation connectionInformation,
                                         SQLException e)
        Overrides:
        onAfterGetConnection in class com.p6spy.engine.event.JdbcEventListener
      • onBeforeAnyExecute

        public void onBeforeAnyExecute​(com.p6spy.engine.common.StatementInformation statementInformation)
        Overrides:
        onBeforeAnyExecute in class com.p6spy.engine.event.SimpleJdbcEventListener
      • onAfterAnyExecute

        public void onAfterAnyExecute​(com.p6spy.engine.common.StatementInformation statementInformation,
                                      long timeElapsedNanos,
                                      SQLException e)
        Overrides:
        onAfterAnyExecute in class com.p6spy.engine.event.SimpleJdbcEventListener
      • onBeforeResultSetNext

        public void onBeforeResultSetNext​(com.p6spy.engine.common.ResultSetInformation resultSetInformation)
        Overrides:
        onBeforeResultSetNext in class com.p6spy.engine.event.JdbcEventListener
      • onAfterExecuteUpdate

        public void onAfterExecuteUpdate​(com.p6spy.engine.common.PreparedStatementInformation statementInformation,
                                         long timeElapsedNanos,
                                         int rowCount,
                                         SQLException e)
        Overrides:
        onAfterExecuteUpdate in class com.p6spy.engine.event.SimpleJdbcEventListener
      • onAfterExecuteUpdate

        public void onAfterExecuteUpdate​(com.p6spy.engine.common.StatementInformation statementInformation,
                                         long timeElapsedNanos,
                                         String sql,
                                         int rowCount,
                                         SQLException e)
        Overrides:
        onAfterExecuteUpdate in class com.p6spy.engine.event.SimpleJdbcEventListener
      • onAfterStatementClose

        public void onAfterStatementClose​(com.p6spy.engine.common.StatementInformation statementInformation,
                                          SQLException e)
        Overrides:
        onAfterStatementClose in class com.p6spy.engine.event.JdbcEventListener
      • onAfterResultSetClose

        public void onAfterResultSetClose​(com.p6spy.engine.common.ResultSetInformation resultSetInformation,
                                          SQLException e)
        Overrides:
        onAfterResultSetClose in class com.p6spy.engine.event.JdbcEventListener
      • onAfterCommit

        public void onAfterCommit​(com.p6spy.engine.common.ConnectionInformation connectionInformation,
                                  long timeElapsedNanos,
                                  SQLException e)
        Overrides:
        onAfterCommit in class com.p6spy.engine.event.JdbcEventListener
      • onAfterRollback

        public void onAfterRollback​(com.p6spy.engine.common.ConnectionInformation connectionInformation,
                                    long timeElapsedNanos,
                                    SQLException e)
        Overrides:
        onAfterRollback in class com.p6spy.engine.event.JdbcEventListener
      • onAfterConnectionClose

        public void onAfterConnectionClose​(com.p6spy.engine.common.ConnectionInformation connectionInformation,
                                           SQLException e)
        Overrides:
        onAfterConnectionClose in class com.p6spy.engine.event.JdbcEventListener
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered