Interface Subsegment

    • Method Detail

      • end

        boolean end()
        Ends the subsegment. Sets the end time to the current time. Sets inProgress to false. Decrements its parent segment's segment-reference counter.
        Returns:
        true if 1) the parent segment now has a ref. count of zero and 2) the parent segment is sampled
      • getNamespace

        @Nullable java.lang.String getNamespace()
        Specified by:
        getNamespace in interface Entity
        Returns:
        the namespace
      • setNamespace

        void setNamespace​(java.lang.String namespace)
        Specified by:
        setNamespace in interface Entity
        Parameters:
        namespace - the namespace to set
      • setParentSegment

        void setParentSegment​(Segment parentSegment)
        Parameters:
        parentSegment - the parentSegment to set
      • getPrecursorIds

        java.util.Set<java.lang.String> getPrecursorIds()
        Returns:
        the precursorIds
      • setPrecursorIds

        void setPrecursorIds​(java.util.Set<java.lang.String> precursorIds)
        Parameters:
        precursorIds - the precursorIds to set
      • addPrecursorId

        void addPrecursorId​(java.lang.String precursorId)
        Parameters:
        precursorId - the precursor ID to add to the set
      • shouldPropagate

        boolean shouldPropagate()
        Determines if this subsegment should propagate its trace context downstream
        Returns:
        true if its trace context should be propagated downstream, false otherwise
      • streamSerialize

        java.lang.String streamSerialize()
        Serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own.
        Returns:
        the string representation of the subsegment with enough information for it to be streamed
      • prettyStreamSerialize

        java.lang.String prettyStreamSerialize()
        Pretty-serializes the subsegment as a standalone String with enough information for the subsegment to be streamed on its own. Only used for debugging.
        Returns:
        the pretty string representation of the subsegment with enough information for it to be streamed
      • close

        void close()
        Implements the AutoCloseable interface. Warning. This method is intended to be private to the xray library and should not be used externally. Instead, use AWSXRay.endSubsegment(Subsegment).
        Specified by:
        close in interface java.lang.AutoCloseable
      • isRecording

        boolean isRecording()
      • setSampledFalse

        void setSampledFalse()