Package io.opencensus.trace.export
Class SampledSpanStore.LatencyFilter
- java.lang.Object
-
- io.opencensus.trace.export.SampledSpanStore.LatencyFilter
-
- Direct Known Subclasses:
AutoValue_SampledSpanStore_LatencyFilter
- Enclosing class:
- SampledSpanStore
@Immutable public abstract static class SampledSpanStore.LatencyFilter extends java.lang.Object
Filter for latency based sampled spans. Used to filter results returned by theSampledSpanStore.getLatencySampledSpans(LatencyFilter)
request.- Since:
- 0.5
-
-
Constructor Summary
Constructors Constructor Description LatencyFilter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SampledSpanStore.LatencyFilter
create(java.lang.String spanName, long latencyLowerNs, long latencyUpperNs, int maxSpansToReturn)
Returns a new instance ofLatencyFilter
.abstract long
getLatencyLowerNs()
Returns the latency lower bound of this bucket (inclusive).abstract long
getLatencyUpperNs()
Returns the latency upper bound of this bucket (exclusive).abstract int
getMaxSpansToReturn()
Returns the maximum number of spans to be returned.abstract java.lang.String
getSpanName()
Returns the span name used by this filter.
-
-
-
Method Detail
-
create
public static SampledSpanStore.LatencyFilter create(java.lang.String spanName, long latencyLowerNs, long latencyUpperNs, int maxSpansToReturn)
Returns a new instance ofLatencyFilter
.Filters all the spans based on
spanName
and latency in the interval [latencyLowerNs, latencyUpperNs) and returns a maximum ofmaxSpansToReturn
.- Parameters:
spanName
- the name of the span.latencyLowerNs
- the latency lower bound.latencyUpperNs
- the latency upper bound.maxSpansToReturn
- the maximum number of results to be returned.0
means all.- Returns:
- a new instance of
LatencyFilter
. - Throws:
java.lang.NullPointerException
- ifspanName
isnull
.java.lang.IllegalArgumentException
- ifmaxSpansToReturn
orlatencyLowerNs
orlatencyUpperNs
are 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
-
getLatencyLowerNs
public abstract long getLatencyLowerNs()
Returns the latency lower bound of this bucket (inclusive).- Returns:
- the latency lower bound of this bucket.
- Since:
- 0.5
-
getLatencyUpperNs
public abstract long getLatencyUpperNs()
Returns the latency upper bound of this bucket (exclusive).- Returns:
- the latency upper bound of this bucket.
- Since:
- 0.5
-
getMaxSpansToReturn
public abstract int getMaxSpansToReturn()
Returns the maximum number of spans to be returned.0
means all.- Returns:
- the maximum number of spans to be returned.
- Since:
- 0.5
-
-