Package io.opencensus.trace.export
Class RunningSpanStore
java.lang.Object
io.opencensus.trace.export.RunningSpanStore
- Direct Known Subclasses:
InProcessRunningSpanStore
,RunningSpanStore.NoopRunningSpanStore
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Filter for running spans.private static final class
static class
Summary of all available data for a span name.static class
The summary of all available data. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static RunningSpanStore
Returns the no-op implementation of theRunningSpanStore
.abstract Collection
<SpanData> Returns a list of running spans that match theFilter
.abstract RunningSpanStore.Summary
Returns the summary of all available data such, as number of running spans.abstract void
setMaxNumberOfSpans
(int maxNumberOfSpans) Sets the maximum number of Spans in thRunningSpanStore
.
-
Field Details
-
NOOP_RUNNING_SPAN_STORE
-
-
Constructor Details
-
RunningSpanStore
protected RunningSpanStore()
-
-
Method Details
-
getNoopRunningSpanStore
Returns the no-op implementation of theRunningSpanStore
.- Returns:
- the no-op implementation of the
RunningSpanStore
.
-
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
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
.0
means disabled, by default theRunningSpanStore
is disabled.- Parameters:
maxNumberOfSpans
- the maximum number of Spans in thRunningSpanStore
.- Throws:
IllegalArgumentException
- ifmaxNumberOfSpans
is negative.- Since:
- 0.22
-