Search in sources :

Example 1 with LabelValue

use of io.opencensus.metrics.LabelValue in project instrumentation-java by census-instrumentation.

the class StackdriverExportUtils method createMetric.

// Create a Metric using the LabelKeys and LabelValues.
@VisibleForTesting
static Metric createMetric(io.opencensus.metrics.export.MetricDescriptor metricDescriptor, List<LabelValue> labelValues, String domain, Map<LabelKey, LabelValue> constantLabels) {
    Metric.Builder builder = Metric.newBuilder();
    builder.setType(generateType(metricDescriptor.getName(), domain));
    Map<String, String> stringTagMap = Maps.newHashMap();
    List<LabelKey> labelKeys = metricDescriptor.getLabelKeys();
    for (int i = 0; i < labelValues.size(); i++) {
        String value = labelValues.get(i).getValue();
        if (value == null) {
            continue;
        }
        stringTagMap.put(labelKeys.get(i).getKey(), value);
    }
    for (Map.Entry<LabelKey, LabelValue> constantLabel : constantLabels.entrySet()) {
        String constantLabelKey = constantLabel.getKey().getKey();
        String constantLabelValue = constantLabel.getValue().getValue();
        constantLabelValue = constantLabelValue == null ? "" : constantLabelValue;
        stringTagMap.put(constantLabelKey, constantLabelValue);
    }
    builder.putAllLabels(stringTagMap);
    return builder.build();
}
Also used : LabelValue(io.opencensus.metrics.LabelValue) LabelKey(io.opencensus.metrics.LabelKey) Metric(com.google.api.Metric) ByteString(com.google.protobuf.ByteString) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) Point(com.google.monitoring.v3.Point) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Example 2 with LabelValue

use of io.opencensus.metrics.LabelValue in project instrumentation-java by census-instrumentation.

the class StackdriverExportUtilsTest method convertSummaryMetric.

@Test
public void convertSummaryMetric() {
    io.opencensus.metrics.export.MetricDescriptor expectedMetricDescriptor1 = io.opencensus.metrics.export.MetricDescriptor.create(METRIC_NAME + SUMMARY_SUFFIX_COUNT, METRIC_DESCRIPTION, METRIC_UNIT_2, Type.CUMULATIVE_INT64, LABEL_KEY);
    io.opencensus.metrics.export.MetricDescriptor expectedMetricDescriptor2 = io.opencensus.metrics.export.MetricDescriptor.create(METRIC_NAME + SUMMARY_SUFFIX_SUM, METRIC_DESCRIPTION, METRIC_UNIT, Type.CUMULATIVE_DOUBLE, LABEL_KEY);
    List<LabelKey> labelKeys = new ArrayList<>(LABEL_KEY);
    labelKeys.add(PERCENTILE_LABEL_KEY);
    io.opencensus.metrics.export.MetricDescriptor expectedMetricDescriptor3 = io.opencensus.metrics.export.MetricDescriptor.create(METRIC_NAME + SNAPSHOT_SUFFIX_PERCENTILE, METRIC_DESCRIPTION, METRIC_UNIT, Type.GAUGE_DOUBLE, labelKeys);
    List<io.opencensus.metrics.export.TimeSeries> expectedTimeSeries1 = Collections.singletonList(io.opencensus.metrics.export.TimeSeries.createWithOnePoint(LABEL_VALUE, Point.create(Value.longValue(22), TIMESTAMP), null));
    List<io.opencensus.metrics.export.TimeSeries> expectedTimeSeries2 = Collections.singletonList(io.opencensus.metrics.export.TimeSeries.createWithOnePoint(LABEL_VALUE, Point.create(Value.doubleValue(74.8), TIMESTAMP), null));
    LabelValue existingLabelValues = LABEL_VALUE.get(0);
    List<io.opencensus.metrics.export.TimeSeries> expectedTimeSeries3 = Arrays.asList(io.opencensus.metrics.export.TimeSeries.createWithOnePoint(Arrays.asList(existingLabelValues, LabelValue.create("50.0")), Point.create(Value.doubleValue(6), TIMESTAMP), null), io.opencensus.metrics.export.TimeSeries.createWithOnePoint(Arrays.asList(existingLabelValues, LabelValue.create("75.0")), Point.create(Value.doubleValue(10.2), TIMESTAMP), null), io.opencensus.metrics.export.TimeSeries.createWithOnePoint(Arrays.asList(existingLabelValues, LabelValue.create("98.0")), Point.create(Value.doubleValue(4.6), TIMESTAMP), null), io.opencensus.metrics.export.TimeSeries.createWithOnePoint(Arrays.asList(existingLabelValues, LabelValue.create("99.0")), Point.create(Value.doubleValue(1.2), TIMESTAMP), null));
    List<io.opencensus.metrics.export.Metric> metrics = StackdriverExportUtils.convertSummaryMetric(SUMMARY_METRIC);
    assertThat(metrics).isNotEmpty();
    assertThat(metrics.size()).isEqualTo(3);
    assertThat(metrics.get(0).getMetricDescriptor()).isEqualTo(expectedMetricDescriptor1);
    assertThat(metrics.get(0).getTimeSeriesList()).isNotEmpty();
    assertThat(metrics.get(0).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(0).getTimeSeriesList()).containsExactlyElementsIn(expectedTimeSeries1);
    assertThat(metrics.get(1).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(1).getTimeSeriesList()).containsExactlyElementsIn(expectedTimeSeries2);
    assertThat(metrics.get(1).getTimeSeriesList()).isNotEmpty();
    assertThat(metrics.get(1).getMetricDescriptor()).isEqualTo(expectedMetricDescriptor2);
    assertThat(metrics.get(2).getTimeSeriesList()).isNotEmpty();
    assertThat(metrics.get(2).getMetricDescriptor()).isEqualTo(expectedMetricDescriptor3);
    assertThat(metrics.get(2).getTimeSeriesList().size()).isEqualTo(4);
    assertThat(metrics.get(2).getTimeSeriesList()).containsExactlyElementsIn(expectedTimeSeries3);
}
Also used : TimeSeries(com.google.monitoring.v3.TimeSeries) LabelValue(io.opencensus.metrics.LabelValue) ArrayList(java.util.ArrayList) LabelKey(io.opencensus.metrics.LabelKey) Metric(com.google.api.Metric) Test(org.junit.Test)

Example 3 with LabelValue

use of io.opencensus.metrics.LabelValue in project instrumentation-java by census-instrumentation.

the class LongGaugeImplTest method withConstantLabels.

@Test
public void withConstantLabels() {
    List<LabelKey> labelKeys = Arrays.asList(LabelKey.create("key1", "desc"), LabelKey.create("key2", "desc"));
    List<LabelValue> labelValues = Arrays.asList(LabelValue.create("value1"), LabelValue.create("value2"));
    LabelKey constantKey = LabelKey.create("constant_key", "desc");
    LabelValue constantValue = LabelValue.create("constant_value");
    Map<LabelKey, LabelValue> constantLabels = Collections.<LabelKey, LabelValue>singletonMap(constantKey, constantValue);
    LongGaugeImpl longGauge = new LongGaugeImpl(METRIC_NAME, METRIC_DESCRIPTION, METRIC_UNIT, labelKeys, constantLabels);
    LongPoint longPoint = longGauge.getOrCreateTimeSeries(labelValues);
    longPoint.add(1);
    longPoint.add(2);
    LongPoint defaultPoint = longGauge.getDefaultTimeSeries();
    defaultPoint.set(100);
    List<LabelKey> allKeys = new ArrayList<>(labelKeys);
    allKeys.add(constantKey);
    MetricDescriptor expectedDescriptor = MetricDescriptor.create(METRIC_NAME, METRIC_DESCRIPTION, METRIC_UNIT, Type.GAUGE_INT64, allKeys);
    List<LabelValue> allValues = new ArrayList<>(labelValues);
    allValues.add(constantValue);
    List<TimeSeries> expectedTimeSeriesList = new ArrayList<TimeSeries>();
    TimeSeries defaultTimeSeries = TimeSeries.createWithOnePoint(Arrays.asList(UNSET_VALUE, UNSET_VALUE, constantValue), Point.create(Value.longValue(100), TEST_TIME), null);
    expectedTimeSeriesList.add(TimeSeries.createWithOnePoint(allValues, Point.create(Value.longValue(3), TEST_TIME), null));
    expectedTimeSeriesList.add(defaultTimeSeries);
    Metric metric = longGauge.getMetric(testClock);
    assertThat(metric).isNotNull();
    assertThat(metric.getMetricDescriptor()).isEqualTo(expectedDescriptor);
    assertThat(metric.getTimeSeriesList().size()).isEqualTo(2);
    assertThat(metric.getTimeSeriesList()).containsExactlyElementsIn(expectedTimeSeriesList);
    longGauge.removeTimeSeries(labelValues);
    Metric metric2 = longGauge.getMetric(testClock);
    assertThat(metric2).isNotNull();
    assertThat(metric2.getTimeSeriesList()).containsExactly(defaultTimeSeries);
}
Also used : MetricDescriptor(io.opencensus.metrics.export.MetricDescriptor) TimeSeries(io.opencensus.metrics.export.TimeSeries) LabelValue(io.opencensus.metrics.LabelValue) ArrayList(java.util.ArrayList) LabelKey(io.opencensus.metrics.LabelKey) Metric(io.opencensus.metrics.export.Metric) LongPoint(io.opencensus.metrics.LongGauge.LongPoint) Test(org.junit.Test)

Example 4 with LabelValue

use of io.opencensus.metrics.LabelValue in project instrumentation-java by census-instrumentation.

the class DropWizardMetricsTest method collect.

@Test
public void collect() throws InterruptedException {
    // create dropwizard metrics
    Map<String, String> tags = new HashMap<>();
    tags.put("tag1", "value1");
    tags.put("tag2", "value2");
    List<LabelKey> labelKeys = new ArrayList<>();
    List<LabelValue> labelValues = new ArrayList<>();
    for (Map.Entry<String, String> e : tags.entrySet()) {
        labelKeys.add(LabelKey.create(e.getKey(), e.getKey()));
        labelValues.add(LabelValue.create(e.getValue()));
    }
    Counter evictions = metricRegistry.counter(new MetricName("cache_evictions", tags));
    evictions.inc();
    evictions.inc(3);
    evictions.dec();
    evictions.dec(2);
    metricRegistry.gauge(new MetricName("boolean_gauge", tags), BooleanGauge::new);
    metricRegistry.gauge(new MetricName("double_gauge", tags), DoubleGauge::new);
    metricRegistry.gauge(new MetricName("float_gauge", tags), FloatGauge::new);
    metricRegistry.gauge(new MetricName("integer_gauge", tags), IntegerGauge::new);
    metricRegistry.gauge(new MetricName("long_gauge", tags), LongGauge::new);
    metricRegistry.gauge(new MetricName("notags_boolean_gauge", Collections.emptyMap()), BooleanGauge::new);
    Meter getRequests = metricRegistry.meter(new MetricName("get_requests", tags));
    getRequests.mark();
    getRequests.mark();
    Histogram resultCounts = metricRegistry.histogram(new MetricName("result", tags));
    resultCounts.update(200);
    Timer timer = metricRegistry.timer(new MetricName("requests", tags));
    Timer.Context context = timer.time();
    Thread.sleep(1L);
    context.stop();
    ArrayList<Metric> metrics = new ArrayList<>(dropWizardMetrics.getMetrics());
    assertThat(metrics.size()).isEqualTo(10);
    assertThat(metrics.get(0).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_cache_evictions_counter", "Collected from dropwizard5 (metric=cache_evictions, " + "type=io.dropwizard.metrics5.Counter)", DEFAULT_UNIT, Type.GAUGE_INT64, labelKeys));
    assertThat(metrics.get(0).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(0).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(0).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(0).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(0).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.longValue(1));
    assertThat(metrics.get(0).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    // boolean gauge with tags
    assertThat(metrics.get(1).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_boolean_gauge_gauge", "Collected from dropwizard5 (metric=boolean_gauge, " + "type=io.opencensus.contrib.dropwizard5.DropWizardMetricsTest$BooleanGauge)", DEFAULT_UNIT, Type.GAUGE_INT64, labelKeys));
    assertThat(metrics.get(1).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(1).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(1).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(1).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(1).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.longValue(1));
    assertThat(metrics.get(1).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    assertThat(metrics.get(2).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_double_gauge_gauge", "Collected from dropwizard5 (metric=double_gauge, " + "type=io.opencensus.contrib.dropwizard5.DropWizardMetricsTest$DoubleGauge)", DEFAULT_UNIT, Type.GAUGE_DOUBLE, labelKeys));
    assertThat(metrics.get(2).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(2).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(2).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(2).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(2).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.doubleValue(1.234));
    assertThat(metrics.get(2).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    assertThat(metrics.get(3).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_float_gauge_gauge", "Collected from dropwizard5 (metric=float_gauge, " + "type=io.opencensus.contrib.dropwizard5.DropWizardMetricsTest$FloatGauge)", DEFAULT_UNIT, Type.GAUGE_DOUBLE, labelKeys));
    assertThat(metrics.get(3).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(3).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(3).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(3).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(3).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.doubleValue(0.1234000027179718));
    assertThat(metrics.get(3).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    assertThat(metrics.get(4).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_integer_gauge_gauge", "Collected from dropwizard5 (metric=integer_gauge, " + "type=io.opencensus.contrib.dropwizard5.DropWizardMetricsTest$IntegerGauge)", DEFAULT_UNIT, Type.GAUGE_DOUBLE, labelKeys));
    assertThat(metrics.get(4).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(4).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(4).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(4).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(4).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.doubleValue(1234.0));
    assertThat(metrics.get(4).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    assertThat(metrics.get(5).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_long_gauge_gauge", "Collected from dropwizard5 (metric=long_gauge, " + "type=io.opencensus.contrib.dropwizard5.DropWizardMetricsTest$LongGauge)", DEFAULT_UNIT, Type.GAUGE_DOUBLE, labelKeys));
    assertThat(metrics.get(5).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(5).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(5).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(5).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(5).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.doubleValue(1234.0));
    assertThat(metrics.get(5).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    // boolean gauge with tags
    assertThat(metrics.get(6).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_notags_boolean_gauge_gauge", "Collected from dropwizard5 (metric=notags_boolean_gauge, " + "type=io.opencensus.contrib.dropwizard5.DropWizardMetricsTest$BooleanGauge)", DEFAULT_UNIT, Type.GAUGE_INT64, Collections.emptyList()));
    assertThat(metrics.get(6).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(6).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(0);
    assertThat(metrics.get(6).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(6).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.longValue(1));
    assertThat(metrics.get(6).getTimeSeriesList().get(0).getStartTimestamp()).isNull();
    assertThat(metrics.get(7).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_get_requests_meter", "Collected from dropwizard5 (metric=get_requests, " + "type=io.dropwizard.metrics5.Meter)", DEFAULT_UNIT, Type.CUMULATIVE_INT64, labelKeys));
    assertThat(metrics.get(7).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(7).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(7).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(7).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(7).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.longValue(2));
    assertThat(metrics.get(7).getTimeSeriesList().get(0).getStartTimestamp()).isNotNull();
    assertThat(metrics.get(8).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_result_histogram", "Collected from dropwizard5 (metric=result, " + "type=io.dropwizard.metrics5.Histogram)", DEFAULT_UNIT, Type.SUMMARY, labelKeys));
    assertThat(metrics.get(8).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(8).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(8).getTimeSeriesList().get(0).getLabelValues()).isEqualTo(labelValues);
    assertThat(metrics.get(8).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(8).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.summaryValue(Summary.create(1L, 0.0, Snapshot.create(1L, 0.0, Arrays.asList(ValueAtPercentile.create(50.0, 200.0), ValueAtPercentile.create(75.0, 200.0), ValueAtPercentile.create(98.0, 200.0), ValueAtPercentile.create(99.0, 200.0), ValueAtPercentile.create(99.9, 200.0))))));
    assertThat(metrics.get(8).getTimeSeriesList().get(0).getStartTimestamp()).isInstanceOf(Timestamp.class);
    assertThat(metrics.get(9).getMetricDescriptor()).isEqualTo(MetricDescriptor.create("dropwizard5_requests_timer", "Collected from dropwizard5 (metric=requests, " + "type=io.dropwizard.metrics5.Timer)", NS_UNIT, Type.SUMMARY, labelKeys));
    assertThat(metrics.get(9).getTimeSeriesList().size()).isEqualTo(1);
    assertThat(metrics.get(9).getTimeSeriesList().get(0).getLabelValues().size()).isEqualTo(tags.size());
    assertThat(metrics.get(9).getTimeSeriesList().get(0).getPoints().size()).isEqualTo(1);
    assertThat(metrics.get(9).getTimeSeriesList().get(0).getPoints().get(0).getValue()).isEqualTo(Value.summaryValue(Summary.create(1L, 0.0, Snapshot.create(1L, 0.0, Arrays.asList(ValueAtPercentile.create(50.0, timer.getSnapshot().getMedian()), ValueAtPercentile.create(75.0, timer.getSnapshot().get75thPercentile()), ValueAtPercentile.create(98.0, timer.getSnapshot().get98thPercentile()), ValueAtPercentile.create(99.0, timer.getSnapshot().get99thPercentile()), ValueAtPercentile.create(99.9, timer.getSnapshot().get999thPercentile()))))));
    assertThat(metrics.get(9).getTimeSeriesList().get(0).getStartTimestamp()).isInstanceOf(Timestamp.class);
}
Also used : Histogram(io.dropwizard.metrics5.Histogram) LabelValue(io.opencensus.metrics.LabelValue) HashMap(java.util.HashMap) Meter(io.dropwizard.metrics5.Meter) ArrayList(java.util.ArrayList) MetricName(io.dropwizard.metrics5.MetricName) Counter(io.dropwizard.metrics5.Counter) Timer(io.dropwizard.metrics5.Timer) LabelKey(io.opencensus.metrics.LabelKey) Metric(io.opencensus.metrics.export.Metric) HashMap(java.util.HashMap) Map(java.util.Map) Test(org.junit.Test)

Example 5 with LabelValue

use of io.opencensus.metrics.LabelValue in project instrumentation-java by census-instrumentation.

the class SignalFxSessionAdaptor method createDimensions.

@VisibleForTesting
static Iterable<Dimension> createDimensions(List<LabelKey> keys, List<LabelValue> values) {
    List<Dimension> dimensions = new ArrayList<>(keys.size());
    for (int i = 0; i < values.size(); i++) {
        LabelValue value = values.get(i);
        if (Strings.isNullOrEmpty(value.getValue())) {
            continue;
        }
        dimensions.add(createDimension(keys.get(i), value));
    }
    return dimensions;
}
Also used : LabelValue(io.opencensus.metrics.LabelValue) ArrayList(java.util.ArrayList) Dimension(com.signalfx.metrics.protobuf.SignalFxProtocolBuffers.Dimension) Point(io.opencensus.metrics.export.Point) DataPoint(com.signalfx.metrics.protobuf.SignalFxProtocolBuffers.DataPoint) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

LabelValue (io.opencensus.metrics.LabelValue)22 LabelKey (io.opencensus.metrics.LabelKey)17 Test (org.junit.Test)16 ArrayList (java.util.ArrayList)14 MetricDescriptor (io.opencensus.metrics.export.MetricDescriptor)10 TimeSeries (io.opencensus.metrics.export.TimeSeries)10 Metric (io.opencensus.metrics.export.Metric)9 EqualsTester (com.google.common.testing.EqualsTester)4 Timestamp (io.opencensus.common.Timestamp)4 Metric (com.google.api.Metric)3 VisibleForTesting (com.google.common.annotations.VisibleForTesting)3 LongPoint (io.opencensus.metrics.LongGauge.LongPoint)3 TimeSeries (com.google.monitoring.v3.TimeSeries)2 DoublePoint (io.opencensus.metrics.DoubleCumulative.DoublePoint)2 DoublePoint (io.opencensus.metrics.DoubleGauge.DoublePoint)2 LongPoint (io.opencensus.metrics.LongCumulative.LongPoint)2 Type (io.opencensus.metrics.export.MetricDescriptor.Type)2 Value (io.opencensus.metrics.export.Value)2 List (java.util.List)2 Map (java.util.Map)2