Class InProcessRunningSpanStore
java.lang.Object
io.opencensus.trace.export.RunningSpanStore
io.opencensus.implcore.trace.export.InProcessRunningSpanStore
In-process implementation of the
RunningSpanStore
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Nested classes/interfaces inherited from class io.opencensus.trace.export.RunningSpanStore
RunningSpanStore.Filter, RunningSpanStore.PerSpanNameSummary, RunningSpanStore.Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static InProcessRunningSpanStore
create()
boolean
Returnstrue
if the RunningSpanStore is enabled.Returns a list of running spans that match theFilter
.Returns the summary of all available data such, as number of running spans.void
onEnd
(RecordEventsSpanImpl span) Removes theSpan
from the running spans list when theSpan
ends.void
onStart
(RecordEventsSpanImpl span) Adds theSpan
into the running spans list when theSpan
starts.void
setMaxNumberOfSpans
(int maxNumberOfSpans) Sets the maximum number of Spans in thRunningSpanStore
.
-
Field Details
-
EMPTY_SUMMARY
-
impl
-
-
Constructor Details
-
InProcessRunningSpanStore
public InProcessRunningSpanStore()
-
-
Method Details
-
create
-
onStart
Adds theSpan
into the running spans list when theSpan
starts.- Parameters:
span
- theSpan
that started.
-
onEnd
Removes theSpan
from the running spans list when theSpan
ends.- Parameters:
span
- theSpan
that ended.
-
getEnabled
public boolean getEnabled()Returnstrue
if the RunningSpanStore is enabled.- Returns:
true
if the RunningSpanStore is enabled.
-
getSummary
Description copied from class:RunningSpanStore
Returns the summary of all available data such, as number of running spans.- Specified by:
getSummary
in classRunningSpanStore
- Returns:
- the summary of all available data.
-
getRunningSpans
Description copied from class:RunningSpanStore
Returns a list of running spans that match theFilter
.- Specified by:
getRunningSpans
in classRunningSpanStore
- 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 thRunningSpanStore
.0
means disabled, by default theRunningSpanStore
is disabled.- Specified by:
setMaxNumberOfSpans
in classRunningSpanStore
- Parameters:
maxNumberOfSpans
- the maximum number of Spans in thRunningSpanStore
.
-