Class TraceQueryExecutionListener

java.lang.Object
org.springframework.cloud.sleuth.instrument.jdbc.TraceQueryExecutionListener
All Implemented Interfaces:
net.ttddyy.dsproxy.listener.MethodExecutionListener, net.ttddyy.dsproxy.listener.QueryExecutionListener, org.springframework.core.Ordered

public class TraceQueryExecutionListener extends Object implements net.ttddyy.dsproxy.listener.QueryExecutionListener, net.ttddyy.dsproxy.listener.MethodExecutionListener, org.springframework.core.Ordered
Listener to represent each connection and sql query as a span.
Since:
3.1.0
Author:
Arthur Gavlyukovskiy
  • Field Summary

    Fields inherited from interface net.ttddyy.dsproxy.listener.MethodExecutionListener

    DEFAULT

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface net.ttddyy.dsproxy.listener.QueryExecutionListener

    DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
    TraceQueryExecutionListener(org.springframework.beans.factory.BeanFactory beanFactory, List<TraceType> traceTypes, List<TraceListenerStrategySpanCustomizer<? super CommonDataSource>> customizers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterMethod(net.ttddyy.dsproxy.listener.MethodExecutionContext executionContext)
     
    void
    afterQuery(net.ttddyy.dsproxy.ExecutionInfo execInfo, List<net.ttddyy.dsproxy.QueryInfo> queryInfoList)
     
    void
    beforeMethod(net.ttddyy.dsproxy.listener.MethodExecutionContext executionContext)
     
    void
    beforeQuery(net.ttddyy.dsproxy.ExecutionInfo execInfo, List<net.ttddyy.dsproxy.QueryInfo> queryInfoList)
     
    int
     

    Methods inherited from class java.lang.Object

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

  • Method Details

    • beforeQuery

      public void beforeQuery(net.ttddyy.dsproxy.ExecutionInfo execInfo, List<net.ttddyy.dsproxy.QueryInfo> queryInfoList)
      Specified by:
      beforeQuery in interface net.ttddyy.dsproxy.listener.QueryExecutionListener
    • afterQuery

      public void afterQuery(net.ttddyy.dsproxy.ExecutionInfo execInfo, List<net.ttddyy.dsproxy.QueryInfo> queryInfoList)
      Specified by:
      afterQuery in interface net.ttddyy.dsproxy.listener.QueryExecutionListener
    • beforeMethod

      public void beforeMethod(net.ttddyy.dsproxy.listener.MethodExecutionContext executionContext)
      Specified by:
      beforeMethod in interface net.ttddyy.dsproxy.listener.MethodExecutionListener
    • afterMethod

      public void afterMethod(net.ttddyy.dsproxy.listener.MethodExecutionContext executionContext)
      Specified by:
      afterMethod in interface net.ttddyy.dsproxy.listener.MethodExecutionListener
    • getOrder

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