@Immutable public abstract static class SampledSpanStore.ErrorFilter extends Object
SampledSpanStore.getErrorSampledSpans(ErrorFilter)
request.Modifier and Type | Method and Description |
---|---|
static SampledSpanStore.ErrorFilter |
create(String spanName,
Status.CanonicalCode canonicalCode,
int maxSpansToReturn)
Returns a new instance of
ErrorFilter . |
abstract Status.CanonicalCode |
getCanonicalCode()
Returns the canonical code used by this filter.
|
abstract int |
getMaxSpansToReturn()
Returns the maximum number of spans to be returned.
|
abstract String |
getSpanName()
Returns the span name used by this filter.
|
public static SampledSpanStore.ErrorFilter create(String spanName, @Nullable Status.CanonicalCode canonicalCode, int maxSpansToReturn)
ErrorFilter
.
Filters all the spans based on spanName
and canonicalCode
and returns a
maximum of maxSpansToReturn
.
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.ErrorFilter
.NullPointerException
- if spanName
is null
.IllegalArgumentException
- if canonicalCode
is Status.CanonicalCode.OK
or
maxSpansToReturn
is negative.public abstract String getSpanName()
@Nullable public abstract Status.CanonicalCode getCanonicalCode()
Status.CanonicalCode.OK
. If null
then all errors match.public abstract int getMaxSpansToReturn()
SpanData
. 0
means all.