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 classNested classes/interfaces inherited from class RunningSpanStore
RunningSpanStore.Filter, RunningSpanStore.PerSpanNameSummary, RunningSpanStore.Summary -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static InProcessRunningSpanStorecreate()booleanReturnstrueif 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.voidonEnd(RecordEventsSpanImpl span) Removes theSpanfrom the running spans list when theSpanends.voidonStart(RecordEventsSpanImpl span) Adds theSpaninto the running spans list when theSpanstarts.voidsetMaxNumberOfSpans(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 theSpaninto the running spans list when theSpanstarts.- Parameters:
span- theSpanthat started.
-
onEnd
Removes theSpanfrom the running spans list when theSpanends.- Parameters:
span- theSpanthat ended.
-
getEnabled
public boolean getEnabled()Returnstrueif the RunningSpanStore is enabled.- Returns:
trueif the RunningSpanStore is enabled.
-
getSummary
Description copied from class:RunningSpanStoreReturns the summary of all available data such, as number of running spans.- Specified by:
getSummaryin classRunningSpanStore- Returns:
- the summary of all available data.
-
getRunningSpans
Description copied from class:RunningSpanStoreReturns a list of running spans that match theFilter.- Specified by:
getRunningSpansin 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:RunningSpanStoreSets the maximum number of Spans in thRunningSpanStore.0means disabled, by default theRunningSpanStoreis disabled.- Specified by:
setMaxNumberOfSpansin classRunningSpanStore- Parameters:
maxNumberOfSpans- the maximum number of Spans in thRunningSpanStore.
-