use of io.opencensus.tags.TagContext in project instrumentation-java by census-instrumentation.
the class ContextUtilsTest method testGetCurrentTagContext_DefaultContext.
@Test
public void testGetCurrentTagContext_DefaultContext() {
TagContext tags = ContextUtils.getValue(Context.current());
assertThat(tags).isNotNull();
assertThat(asList(tags)).isEmpty();
}
use of io.opencensus.tags.TagContext in project instrumentation-java by census-instrumentation.
the class RecordDifferentTagValuesBenchmark method record.
private static MeasureMap record(Data data, Measure.MeasureLong measure, int value) {
MeasureMap map = data.recorder.newMeasureMap();
map.put(measure, value);
for (TagContext tags : data.contexts) {
map.record(tags);
}
return map;
}
use of io.opencensus.tags.TagContext in project instrumentation-java by census-instrumentation.
the class OcAgentMetricsExporterIntegrationTest method recordTaggedStat.
private static void recordTaggedStat(TagKey key, String value, MeasureLong ml, long n) {
TagContext context = tagger.emptyBuilder().put(key, TagValue.create(value)).build();
statsRecorder.newMeasureMap().put(ml, n).record(context);
}
use of io.opencensus.tags.TagContext in project instrumentation-java by census-instrumentation.
the class OcAgentMetricsExporterIntegrationTest method recordTaggedStat.
private static void recordTaggedStat(TagKey key, String value, MeasureDouble md, double d) {
TagContext context = tagger.emptyBuilder().put(key, TagValue.create(value)).build();
statsRecorder.newMeasureMap().put(md, d).record(context);
}
use of io.opencensus.tags.TagContext in project instrumentation-java by census-instrumentation.
the class OcAgentMetricsExporterIntegrationTest method recordStat.
private static void recordStat(MeasureLong ml, Long n) {
TagContext empty = tagger.emptyBuilder().build();
statsRecorder.newMeasureMap().put(ml, n).record(empty);
}
Aggregations