Class RunningSpanStore

java.lang.Object
io.opencensus.trace.export.RunningSpanStore
Direct Known Subclasses:
InProcessRunningSpanStore, RunningSpanStore.NoopRunningSpanStore

@ThreadSafe public abstract class RunningSpanStore extends Object
This class allows users to access in-process information about all running spans.

The running spans tracking is available for all the spans with the option Span.Options.RECORD_EVENTS. This functionality allows users to debug stuck operations or long living operations.

Since:
0.5
  • Field Details

    • NOOP_RUNNING_SPAN_STORE

      private static final RunningSpanStore NOOP_RUNNING_SPAN_STORE
  • Constructor Details

    • RunningSpanStore

      protected RunningSpanStore()
  • Method Details

    • getNoopRunningSpanStore

      static RunningSpanStore getNoopRunningSpanStore()
      Returns the no-op implementation of the RunningSpanStore.
      Returns:
      the no-op implementation of the RunningSpanStore.
    • getSummary

      public abstract RunningSpanStore.Summary getSummary()
      Returns the summary of all available data such, as number of running spans.
      Returns:
      the summary of all available data.
      Since:
      0.5
    • getRunningSpans

      public abstract Collection<SpanData> getRunningSpans(RunningSpanStore.Filter filter)
      Returns a list of running spans that match the Filter.
      Parameters:
      filter - used to filter the returned spans.
      Returns:
      a list of running spans that match the Filter.
      Since:
      0.5
    • setMaxNumberOfSpans

      public abstract void setMaxNumberOfSpans(int maxNumberOfSpans)
      Sets the maximum number of Spans in th RunningSpanStore.

      0 means disabled, by default the RunningSpanStore is disabled.

      Parameters:
      maxNumberOfSpans - the maximum number of Spans in th RunningSpanStore.
      Throws:
      IllegalArgumentException - if maxNumberOfSpans is negative.
      Since:
      0.22