Class RunningSpanStore.Filter

java.lang.Object
io.opencensus.trace.export.RunningSpanStore.Filter
Direct Known Subclasses:
AutoValue_RunningSpanStore_Filter
Enclosing class:
RunningSpanStore

@Immutable public abstract static class RunningSpanStore.Filter extends Object
Filter for running spans. Used to filter results returned by the RunningSpanStore.getRunningSpans(Filter) request.
Since:
0.5
  • Constructor Details

    • Filter

      Filter()
  • Method Details

    • create

      public static RunningSpanStore.Filter create(String spanName, int maxSpansToReturn)
      Returns a new instance of Filter.

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

      Parameters:
      spanName - the name of the span.
      maxSpansToReturn - the maximum number of results to be returned. 0 means all.
      Returns:
      a new instance of Filter.
      Throws:
      NullPointerException - if spanName is null.
      IllegalArgumentException - if maxSpansToReturn is negative.
      Since:
      0.5
    • getSpanName

      public abstract String getSpanName()
      Returns the span name.
      Returns:
      the span name.
      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