Class InProcessRunningSpanStore

java.lang.Object
io.opencensus.trace.export.RunningSpanStore
io.opencensus.implcore.trace.export.InProcessRunningSpanStore

@ThreadSafe public final class InProcessRunningSpanStore extends RunningSpanStore
In-process implementation of the RunningSpanStore.
  • Field Details

  • Constructor Details

    • InProcessRunningSpanStore

      public InProcessRunningSpanStore()
  • Method Details

    • create

      static InProcessRunningSpanStore create()
    • onStart

      public void onStart(RecordEventsSpanImpl span)
      Adds the Span into the running spans list when the Span starts.
      Parameters:
      span - the Span that started.
    • onEnd

      public void onEnd(RecordEventsSpanImpl span)
      Removes the Span from the running spans list when the Span ends.
      Parameters:
      span - the Span that ended.
    • getEnabled

      public boolean getEnabled()
      Returns true if the RunningSpanStore is enabled.
      Returns:
      true if the RunningSpanStore is enabled.
    • getSummary

      public RunningSpanStore.Summary getSummary()
      Description copied from class: RunningSpanStore
      Returns the summary of all available data such, as number of running spans.
      Specified by:
      getSummary in class RunningSpanStore
      Returns:
      the summary of all available data.
    • getRunningSpans

      public Collection<SpanData> getRunningSpans(RunningSpanStore.Filter filter)
      Description copied from class: RunningSpanStore
      Returns a list of running spans that match the Filter.
      Specified by:
      getRunningSpans in class RunningSpanStore
      Parameters:
      filter - used to filter the returned spans.
      Returns:
      a list of running spans that match the Filter.
    • setMaxNumberOfSpans

      public void setMaxNumberOfSpans(int maxNumberOfSpans)
      Description copied from class: RunningSpanStore
      Sets the maximum number of Spans in th RunningSpanStore.

      0 means disabled, by default the RunningSpanStore is disabled.

      Specified by:
      setMaxNumberOfSpans in class RunningSpanStore
      Parameters:
      maxNumberOfSpans - the maximum number of Spans in th RunningSpanStore.