Class SampledSpanStore.ErrorFilter

    • Constructor Detail

      • ErrorFilter

        ErrorFilter()
    • Method Detail

      • create

        public static SampledSpanStore.ErrorFilter create​(java.lang.String spanName,
                                                          @Nullable
                                                          Status.CanonicalCode canonicalCode,
                                                          int maxSpansToReturn)
        Returns a new instance of ErrorFilter.

        Filters all the spans based on spanName and canonicalCode and returns a maximum of maxSpansToReturn.

        Parameters:
        spanName - the name of the span.
        canonicalCode - the error code of the span. null can be used to query all error codes.
        maxSpansToReturn - the maximum number of results to be returned. 0 means all.
        Returns:
        a new instance of ErrorFilter.
        Throws:
        java.lang.NullPointerException - if spanName is null.
        java.lang.IllegalArgumentException - if canonicalCode is Status.CanonicalCode.OK or maxSpansToReturn is negative.
        Since:
        0.5
      • getSpanName

        public abstract java.lang.String getSpanName()
        Returns the span name used by this filter.
        Returns:
        the span name used by this filter.
        Since:
        0.5
      • getCanonicalCode

        @Nullable
        public abstract Status.CanonicalCode getCanonicalCode()
        Returns the canonical code used by this filter. Always different than Status.CanonicalCode.OK. If null then all errors match.
        Returns:
        the canonical code used by this filter.
        Since:
        0.5
      • getMaxSpansToReturn

        public abstract int getMaxSpansToReturn()
        Returns the maximum number of spans to be returned. Used to enforce the number of returned SpanData. 0 means all.
        Returns:
        the maximum number of spans to be returned.
        Since:
        0.5