Class MSF4JZipkinTracingInterceptor

  • All Implemented Interfaces:
    org.wso2.msf4j.Interceptor, org.wso2.msf4j.interceptor.RequestInterceptor, org.wso2.msf4j.interceptor.ResponseInterceptor

    public class MSF4JZipkinTracingInterceptor
    extends java.lang.Object
    implements org.wso2.msf4j.Interceptor
    Interceptor for tracing server side request/response flows to Zipkin.
    • Constructor Summary

      Constructors 
      Constructor Description
      MSF4JZipkinTracingInterceptor​(java.lang.String microServiceName)
      Constructor of the MSF4JTracingInterceptor.
      MSF4JZipkinTracingInterceptor​(java.lang.String microServiceName, java.lang.String zipkinUrl)
      Constructor of the MSF4JTracingInterceptor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void postCall​(org.wso2.msf4j.Request request, int status, org.wso2.msf4j.ServiceMethodInfo serviceMethodInfo)
      Intercepts the server response flow and extract response information to be published to the Zipkin server for tracing.
      boolean preCall​(org.wso2.msf4j.Request request, org.wso2.msf4j.Response responder, org.wso2.msf4j.ServiceMethodInfo serviceMethodInfo)
      Intercepts the server request flow and extract request information to be published to the Zipkin server for tracing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.wso2.msf4j.Interceptor

        interceptRequest, interceptResponse, onResponseInterceptionError
      • Methods inherited from interface org.wso2.msf4j.interceptor.RequestInterceptor

        onRequestInterceptionError
    • Constructor Detail

      • MSF4JZipkinTracingInterceptor

        public MSF4JZipkinTracingInterceptor​(java.lang.String microServiceName)
        Constructor of the MSF4JTracingInterceptor.
        Parameters:
        microServiceName - Name of the Microservice
      • MSF4JZipkinTracingInterceptor

        public MSF4JZipkinTracingInterceptor​(java.lang.String microServiceName,
                                             java.lang.String zipkinUrl)
        Constructor of the MSF4JTracingInterceptor.
        Parameters:
        microServiceName - Name of the Microservice
        zipkinUrl - Base URL of the Zipkin server
    • Method Detail

      • preCall

        public boolean preCall​(org.wso2.msf4j.Request request,
                               org.wso2.msf4j.Response responder,
                               org.wso2.msf4j.ServiceMethodInfo serviceMethodInfo)
                        throws java.lang.Exception
        Intercepts the server request flow and extract request information to be published to the Zipkin server for tracing.
        Specified by:
        preCall in interface org.wso2.msf4j.Interceptor
        Throws:
        java.lang.Exception
      • postCall

        public void postCall​(org.wso2.msf4j.Request request,
                             int status,
                             org.wso2.msf4j.ServiceMethodInfo serviceMethodInfo)
                      throws java.lang.Exception
        Intercepts the server response flow and extract response information to be published to the Zipkin server for tracing.
        Specified by:
        postCall in interface org.wso2.msf4j.Interceptor
        Throws:
        java.lang.Exception