Class ZipkinService


  • public class ZipkinService
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createAndSendRootSpan​(java.lang.String did, java.time.OffsetDateTime created, java.lang.String fileName, java.lang.String flow)
      Create a span that represents the entire lifecycle of the given deltaFile.
      DeltafiSpan createChildSpan​(java.lang.String did, java.lang.String actionName, java.lang.String fileName, java.lang.String flow)
      Create a span that represents the lifecycle of the deltaFile going through the given action.
      DeltafiSpan createChildSpan​(java.lang.String did, java.lang.String actionName, java.lang.String fileName, java.lang.String flow, java.time.OffsetDateTime created)
      Create a span that represents the lifecycle of the deltaFile going through the given action.
      boolean isEnabled()  
      void markSpanComplete​(DeltafiSpan span)
      Set the duration of the span based on the current time and send the span to the zipkin backend.
      void sendQueuedSpans()  
      void shutdown()  
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • shutdown

        @PreDestroy
        public void shutdown()
      • createAndSendRootSpan

        public void createAndSendRootSpan​(java.lang.String did,
                                          java.time.OffsetDateTime created,
                                          java.lang.String fileName,
                                          java.lang.String flow)
        Create a span that represents the entire lifecycle of the given deltaFile. This should be fired when the DeltaFile hits a terminal state.
        Parameters:
        did - DeltaFile id
        created - time of the deltaFile creation
        fileName - original fileName
        flow - flow that this deltaFile belongs too
      • createChildSpan

        public DeltafiSpan createChildSpan​(java.lang.String did,
                                           java.lang.String actionName,
                                           java.lang.String fileName,
                                           java.lang.String flow)
        Create a span that represents the lifecycle of the deltaFile going through the given action.
        Parameters:
        did - DeltaFile id
        actionName - Action acting on the deltaFile in this span
        fileName - original fileName
        flow - flow that this deltaFile belongs too
        Returns:
        The span for the deltaFile going through the action
      • createChildSpan

        public DeltafiSpan createChildSpan​(java.lang.String did,
                                           java.lang.String actionName,
                                           java.lang.String fileName,
                                           java.lang.String flow,
                                           java.time.OffsetDateTime created)
        Create a span that represents the lifecycle of the deltaFile going through the given action.
        Parameters:
        did - DeltaFile id
        actionName - Action acting on the deltaFile in this span
        fileName - original fileName
        flow - flow that this deltaFile belongs too
        created - optional timestamp
        Returns:
        The span for the deltaFile going through the action
      • markSpanComplete

        public void markSpanComplete​(DeltafiSpan span)
        Set the duration of the span based on the current time and send the span to the zipkin backend.
        Parameters:
        span - span to finish and send
      • sendQueuedSpans

        public void sendQueuedSpans()
      • isEnabled

        public boolean isEnabled()