Class MeasureMap
java.lang.Object
io.opencensus.stats.MeasureMap
- Direct Known Subclasses:
MeasureMapImpl, NoopStats.NoopMeasureMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract MeasureMapput(Measure.MeasureDouble measure, double value) Associates theMeasure.MeasureDoublewith the given value.abstract MeasureMapput(Measure.MeasureLong measure, long value) Associates theMeasure.MeasureLongwith the given value.putAttachment(String key, AttachmentValue value) Associate the contextual information of anExemplarto thisMeasureMap.putAttachment(String key, String value) Deprecated.abstract voidrecord()Records all of the measures at the same time, with the currentTagContext.abstract voidrecord(TagContext tags) Records all of the measures at the same time, with an explicitTagContext.
-
Constructor Details
-
MeasureMap
public MeasureMap()
-
-
Method Details
-
put
Associates theMeasure.MeasureDoublewith the given value. Subsequent updates to the sameMeasure.MeasureDoublewill overwrite the previous value.- Parameters:
measure- theMeasure.MeasureDoublevalue- the value to be associated withmeasure- Returns:
- this
- Since:
- 0.8
-
put
Associates theMeasure.MeasureLongwith the given value. Subsequent updates to the sameMeasure.MeasureLongwill overwrite the previous value.- Parameters:
measure- theMeasure.MeasureLongvalue- the value to be associated withmeasure- Returns:
- this
- Since:
- 0.8
-
putAttachment
Deprecated.in favor ofputAttachment(String, AttachmentValue).Associate the contextual information of anExemplarto thisMeasureMap. Contextual information is represented asStringkey-value pairs.If this method is called multiple times with the same key, only the last value will be kept.
- Parameters:
key- the key of contextual information of anExemplar.value- the string representation of contextual information of anExemplar.- Returns:
- this
- Since:
- 0.16
-
putAttachment
Associate the contextual information of anExemplarto thisMeasureMap. Contextual information is represented as aStringkey and anAttachmentValue.If this method is called multiple times with the same key, only the last value will be kept.
- Parameters:
key- the key of contextual information of anExemplar.value- the value of contextual information of anExemplar.- Returns:
- this
- Since:
- 0.20
-
record
public abstract void record()Records all of the measures at the same time, with the currentTagContext.This method records all of the stats in the
MeasureMapevery time it is called.- Since:
- 0.8
-
record
Records all of the measures at the same time, with an explicitTagContext.This method records all of the stats in the
MeasureMapevery time it is called.- Parameters:
tags- the tags associated with the measurements.- Since:
- 0.8
-
putAttachment(String, AttachmentValue).