Package io.opencensus.implcore.stats
Class MeasureMapImpl
java.lang.Object
io.opencensus.stats.MeasureMap
io.opencensus.implcore.stats.MeasureMapImpl
Implementation of
MeasureMap
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MeasureMapInternal.Builder
private boolean
private static final Logger
private final StatsManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static MeasureMapImpl
create
(StatsManager statsManager) put
(Measure.MeasureDouble measure, double value) Associates theMeasure.MeasureDouble
with the given value.put
(Measure.MeasureLong measure, long value) Associates theMeasure.MeasureLong
with the given value.putAttachment
(String key, AttachmentValue value) Associate the contextual information of anExemplar
to thisMeasureMap
.void
record()
Records all of the measures at the same time, with the currentTagContext
.void
record
(TagContext tags) Records all of the measures at the same time, with an explicitTagContext
.Methods inherited from class io.opencensus.stats.MeasureMap
putAttachment
-
Field Details
-
logger
-
statsManager
-
builder
-
hasUnsupportedValues
private volatile boolean hasUnsupportedValues
-
-
Constructor Details
-
MeasureMapImpl
-
-
Method Details
-
create
-
put
Description copied from class:MeasureMap
Associates theMeasure.MeasureDouble
with the given value. Subsequent updates to the sameMeasure.MeasureDouble
will overwrite the previous value.- Specified by:
put
in classMeasureMap
- Parameters:
measure
- theMeasure.MeasureDouble
value
- the value to be associated withmeasure
- Returns:
- this
-
put
Description copied from class:MeasureMap
Associates theMeasure.MeasureLong
with the given value. Subsequent updates to the sameMeasure.MeasureLong
will overwrite the previous value.- Specified by:
put
in classMeasureMap
- Parameters:
measure
- theMeasure.MeasureLong
value
- the value to be associated withmeasure
- Returns:
- this
-
putAttachment
Description copied from class:MeasureMap
Associate the contextual information of anExemplar
to thisMeasureMap
. Contextual information is represented as aString
key and anAttachmentValue
.If this method is called multiple times with the same key, only the last value will be kept.
- Overrides:
putAttachment
in classMeasureMap
- Parameters:
key
- the key of contextual information of anExemplar
.value
- the value of contextual information of anExemplar
.- Returns:
- this
-
record
public void record()Description copied from class:MeasureMap
Records all of the measures at the same time, with the currentTagContext
.This method records all of the stats in the
MeasureMap
every time it is called.- Specified by:
record
in classMeasureMap
-
record
Description copied from class:MeasureMap
Records all of the measures at the same time, with an explicitTagContext
.This method records all of the stats in the
MeasureMap
every time it is called.- Specified by:
record
in classMeasureMap
- Parameters:
tags
- the tags associated with the measurements.
-