Package 

Interface TraceSegment


  • 
    public interface TraceSegment
    
                        

    A {@code TraceSegment} represents the local, i.e. in the scope of this {@code Tracer}, part of a a {@code Trace}. It can consist of multiple spans, and the {@code TraceSegment} instance can only be used in relation to the {@code Span} from which it was acquired. This means that the {@code * TraceSegment} should not be stored and used at a later time, or passed around to async functions.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class TraceSegment.NoOp
    • Method Summary

      Modifier and Type Method Description
      void setTagTop(String key, Object value) Add a tag to the top of this {@code TraceSegment}.
      abstract void setTagTop(String key, Object value, boolean sanitize) Add a tag to the top of this {@code TraceSegment} with optional key sanitization.
      void setTagCurrent(String key, Object value) Add a tag to the current span in this {@code TraceSegment}.
      abstract void setTagCurrent(String key, Object value, boolean sanitize) Add a tag to the current span in this {@code TraceSegment}.
      abstract void setDataTop(String key, Object value) Add data to the top of this {@code TraceSegment}.
      abstract void effectivelyBlocked() Mark the request as effectively blocked, by setting the tag appsec.
      abstract void setDataCurrent(String key, Object value) Add data to the current span in this {@code TraceSegment}.
      • Methods inherited from class java.lang.Object

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

      • setTagTop

         void setTagTop(String key, Object value)

        Add a tag to the top of this {@code TraceSegment}.

        Parameters:
        key - key of the tag
        value - value of the tag
      • setTagTop

         abstract void setTagTop(String key, Object value, boolean sanitize)

        Add a tag to the top of this {@code TraceSegment} with optional key sanitization.

        Parameters:
        key - key of the tag
        value - value of the tag
        sanitize - indicates is key need to be sanitized
      • setTagCurrent

         void setTagCurrent(String key, Object value)

        Add a tag to the current span in this {@code TraceSegment}.

        Parameters:
        key - key of the tag
        value - value of the tag
      • setTagCurrent

         abstract void setTagCurrent(String key, Object value, boolean sanitize)

        Add a tag to the current span in this {@code TraceSegment}. with optional key sanitization.

        Parameters:
        key - key of the tag
        value - value of the tag
        sanitize - indicates is key need to be sanitized
      • setDataTop

         abstract void setDataTop(String key, Object value)

        Add data to the top of this {@code TraceSegment}. The {@code toString} representation of the {@code value} must be valid top level JSON, i.e. an {@code Object} or an {@code Array}.

        Parameters:
        key - key of the data
        value - value of the data
      • effectivelyBlocked

         abstract void effectivelyBlocked()

        Mark the request as effectively blocked, by setting the tag appsec.blocked

      • setDataCurrent

         abstract void setDataCurrent(String key, Object value)

        Add data to the current span in this {@code TraceSegment}. The {@code toString} representationof the {@code value} must be valid top level JSON, i.e. an {@code Object} or an {@code Array}.

        Parameters:
        key - key of the data
        value - value of the data