Package io.opencensus.trace.export
Class RunningSpanStore
- java.lang.Object
-
- io.opencensus.trace.export.RunningSpanStore
-
- Direct Known Subclasses:
InProcessRunningSpanStore,RunningSpanStore.NoopRunningSpanStore
@ThreadSafe public abstract class RunningSpanStore extends java.lang.ObjectThis 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRunningSpanStore.FilterFilter for running spans.private static classRunningSpanStore.NoopRunningSpanStorestatic classRunningSpanStore.PerSpanNameSummarySummary of all available data for a span name.static classRunningSpanStore.SummaryThe summary of all available data.
-
Field Summary
Fields Modifier and Type Field Description private static RunningSpanStoreNOOP_RUNNING_SPAN_STORE
-
Constructor Summary
Constructors Modifier Constructor Description protectedRunningSpanStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static RunningSpanStoregetNoopRunningSpanStore()Returns the no-op implementation of theRunningSpanStore.abstract java.util.Collection<SpanData>getRunningSpans(RunningSpanStore.Filter filter)Returns a list of running spans that match theFilter.abstract RunningSpanStore.SummarygetSummary()Returns the summary of all available data such, as number of running spans.abstract voidsetMaxNumberOfSpans(int maxNumberOfSpans)Sets the maximum number of Spans in thRunningSpanStore.
-
-
-
Field Detail
-
NOOP_RUNNING_SPAN_STORE
private static final RunningSpanStore NOOP_RUNNING_SPAN_STORE
-
-
Method Detail
-
getNoopRunningSpanStore
static RunningSpanStore getNoopRunningSpanStore()
Returns the no-op implementation of theRunningSpanStore.- 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 java.util.Collection<SpanData> getRunningSpans(RunningSpanStore.Filter filter)
Returns a list of running spans that match theFilter.- 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 thRunningSpanStore.0means disabled, by default theRunningSpanStoreis disabled.- Parameters:
maxNumberOfSpans- the maximum number of Spans in thRunningSpanStore.- Throws:
java.lang.IllegalArgumentException- ifmaxNumberOfSpansis negative.- Since:
- 0.22
-
-