From 84630fb6ae3474039cec4977c989b1a30e695906 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Mon, 1 Oct 2018 09:16:23 -0700 Subject: Uptade since tag for the entire metrics package. (#1478) --- .../java/io/opencensus/metrics/Distribution.java | 34 +++++++++++----------- .../main/java/io/opencensus/metrics/LabelKey.java | 6 ++-- .../java/io/opencensus/metrics/LabelValue.java | 4 +-- .../main/java/io/opencensus/metrics/Metric.java | 8 ++--- .../io/opencensus/metrics/MetricDescriptor.java | 26 ++++++++--------- .../java/io/opencensus/metrics/MetricProducer.java | 1 + .../main/java/io/opencensus/metrics/Metrics.java | 6 ++-- .../io/opencensus/metrics/MetricsComponent.java | 6 ++-- api/src/main/java/io/opencensus/metrics/Point.java | 8 ++--- .../java/io/opencensus/metrics/TimeSeries.java | 10 +++---- api/src/main/java/io/opencensus/metrics/Value.java | 10 +++---- .../opencensus/metrics/export/ExportComponent.java | 6 ++-- .../metrics/export/MetricProducerManager.java | 8 ++--- 13 files changed, 67 insertions(+), 66 deletions(-) (limited to 'api/src/main/java') diff --git a/api/src/main/java/io/opencensus/metrics/Distribution.java b/api/src/main/java/io/opencensus/metrics/Distribution.java index bdea7762..87f99635 100644 --- a/api/src/main/java/io/opencensus/metrics/Distribution.java +++ b/api/src/main/java/io/opencensus/metrics/Distribution.java @@ -33,7 +33,7 @@ import javax.annotation.concurrent.Immutable; * {@link Distribution} contains summary statistics for a population of values. It optionally * contains a histogram representing the distribution of those values across a set of buckets. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @AutoValue @@ -51,7 +51,7 @@ public abstract class Distribution { * @param bucketBoundaries bucket boundaries of a histogram. * @param buckets {@link Bucket}s of a histogram. * @return a {@code Distribution}. - * @since 0.16 + * @since 0.17 */ public static Distribution create( double mean, @@ -103,7 +103,7 @@ public abstract class Distribution { * Returns the aggregated mean. * * @return the aggregated mean. - * @since 0.16 + * @since 0.17 */ public abstract double getMean(); @@ -111,7 +111,7 @@ public abstract class Distribution { * Returns the aggregated count. * * @return the aggregated count. - * @since 0.16 + * @since 0.17 */ public abstract long getCount(); @@ -126,7 +126,7 @@ public abstract class Distribution { *

If count is zero then this field must be zero. * * @return the aggregated sum of squared deviations. - * @since 0.16 + * @since 0.17 */ public abstract double getSumOfSquaredDeviations(); @@ -151,7 +151,7 @@ public abstract class Distribution { * monotonically increasing. * * @return the bucket boundaries of this distribution. - * @since 0.16 + * @since 0.17 */ public abstract List getBucketBoundaries(); @@ -159,14 +159,14 @@ public abstract class Distribution { * Returns the aggregated histogram {@link Bucket}s. * * @return the aggregated histogram buckets. - * @since 0.16 + * @since 0.17 */ public abstract List getBuckets(); /** * The histogram bucket of the population values. * - * @since 0.16 + * @since 0.17 */ @AutoValue @Immutable @@ -179,7 +179,7 @@ public abstract class Distribution { * * @param count the number of values in each bucket of the histogram. * @return a {@code Bucket}. - * @since 0.16 + * @since 0.17 */ public static Bucket create(long count) { Utils.checkArgument(count >= 0, "bucket count should be non-negative."); @@ -192,7 +192,7 @@ public abstract class Distribution { * @param count the number of values in each bucket of the histogram. * @param exemplar the {@code Exemplar} of this {@code Bucket}. * @return a {@code Bucket}. - * @since 0.16 + * @since 0.17 */ public static Bucket create(long count, Exemplar exemplar) { Utils.checkArgument(count >= 0, "bucket count should be non-negative."); @@ -204,7 +204,7 @@ public abstract class Distribution { * Returns the number of values in each bucket of the histogram. * * @return the number of values in each bucket of the histogram. - * @since 0.16 + * @since 0.17 */ public abstract long getCount(); @@ -214,7 +214,7 @@ public abstract class Distribution { * * @return the {@code Exemplar} associated with the {@code Bucket}, or {@code null} if there * isn't one. - * @since 0.16 + * @since 0.17 */ @Nullable public abstract Exemplar getExemplar(); @@ -224,7 +224,7 @@ public abstract class Distribution { * An example point that may be used to annotate aggregated distribution values, associated with a * histogram bucket. * - * @since 0.16 + * @since 0.17 */ @Immutable @AutoValue @@ -236,7 +236,7 @@ public abstract class Distribution { * Returns value of the {@link Exemplar} point. * * @return value of the {@code Exemplar} point. - * @since 0.16 + * @since 0.17 */ public abstract double getValue(); @@ -244,7 +244,7 @@ public abstract class Distribution { * Returns the time that this {@link Exemplar}'s value was recorded. * * @return the time that this {@code Exemplar}'s value was recorded. - * @since 0.16 + * @since 0.17 */ public abstract Timestamp getTimestamp(); @@ -252,7 +252,7 @@ public abstract class Distribution { * Returns the contextual information about the example value, represented as a string map. * * @return the contextual information about the example value. - * @since 0.16 + * @since 0.17 */ public abstract Map getAttachments(); @@ -263,7 +263,7 @@ public abstract class Distribution { * @param timestamp the time that this {@code Exemplar}'s value was recorded. * @param attachments the contextual information about the example value. * @return an {@code Exemplar}. - * @since 0.16 + * @since 0.17 */ public static Exemplar create( double value, Timestamp timestamp, Map attachments) { diff --git a/api/src/main/java/io/opencensus/metrics/LabelKey.java b/api/src/main/java/io/opencensus/metrics/LabelKey.java index 01ef0b55..efc51e64 100644 --- a/api/src/main/java/io/opencensus/metrics/LabelKey.java +++ b/api/src/main/java/io/opencensus/metrics/LabelKey.java @@ -38,7 +38,7 @@ public abstract class LabelKey { * @param key the key of a {@code Label}. * @param description a human-readable description of what this label key represents. * @return a {@code LabelKey}. - * @since 0.15 + * @since 0.17 */ public static LabelKey create(String key, String description) { return new AutoValue_LabelKey(key, description); @@ -48,7 +48,7 @@ public abstract class LabelKey { * Returns the key of this {@link LabelKey}. * * @return the key. - * @since 0.15 + * @since 0.17 */ public abstract String getKey(); @@ -56,7 +56,7 @@ public abstract class LabelKey { * Returns the description of this {@link LabelKey}. * * @return the description. - * @since 0.15 + * @since 0.17 */ public abstract String getDescription(); } diff --git a/api/src/main/java/io/opencensus/metrics/LabelValue.java b/api/src/main/java/io/opencensus/metrics/LabelValue.java index e81b63d2..e5708655 100644 --- a/api/src/main/java/io/opencensus/metrics/LabelValue.java +++ b/api/src/main/java/io/opencensus/metrics/LabelValue.java @@ -39,7 +39,7 @@ public abstract class LabelValue { * @param value the value of a {@code Label}. {@code null} value indicates an unset {@code * LabelValue}. * @return a {@code LabelValue}. - * @since 0.15 + * @since 0.17 */ public static LabelValue create(@Nullable String value) { return new AutoValue_LabelValue(value); @@ -50,7 +50,7 @@ public abstract class LabelValue { * supposed to be ignored. * * @return the value. - * @since 0.15 + * @since 0.17 */ @Nullable public abstract String getValue(); diff --git a/api/src/main/java/io/opencensus/metrics/Metric.java b/api/src/main/java/io/opencensus/metrics/Metric.java index fa0018b3..b463420c 100644 --- a/api/src/main/java/io/opencensus/metrics/Metric.java +++ b/api/src/main/java/io/opencensus/metrics/Metric.java @@ -28,7 +28,7 @@ import javax.annotation.concurrent.Immutable; /** * A {@link Metric} with one or more {@link TimeSeries}. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @Immutable @@ -43,7 +43,7 @@ public abstract class Metric { * @param metricDescriptor the {@link MetricDescriptor}. * @param timeSeriesList the {@link TimeSeries} list for this metric. * @return a {@code Metric}. - * @since 0.16 + * @since 0.17 */ public static Metric create(MetricDescriptor metricDescriptor, List timeSeriesList) { checkTypeMatch(metricDescriptor.getType(), timeSeriesList); @@ -54,7 +54,7 @@ public abstract class Metric { * Returns the {@link MetricDescriptor} of this metric. * * @return the {@code MetricDescriptor} of this metric. - * @since 0.16 + * @since 0.17 */ public abstract MetricDescriptor getMetricDescriptor(); @@ -64,7 +64,7 @@ public abstract class Metric { *

The type of the {@link TimeSeries#getPoints()} must match {@link MetricDescriptor.Type}. * * @return the {@code TimeSeriesList} for this metric. - * @since 0.16 + * @since 0.17 */ public abstract List getTimeSeriesList(); diff --git a/api/src/main/java/io/opencensus/metrics/MetricDescriptor.java b/api/src/main/java/io/opencensus/metrics/MetricDescriptor.java index 4558446a..e20730e9 100644 --- a/api/src/main/java/io/opencensus/metrics/MetricDescriptor.java +++ b/api/src/main/java/io/opencensus/metrics/MetricDescriptor.java @@ -27,7 +27,7 @@ import javax.annotation.concurrent.Immutable; /** * {@link MetricDescriptor} defines a {@code Metric} type and its schema. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @Immutable @@ -45,7 +45,7 @@ public abstract class MetricDescriptor { * @param type type of {@code MetricDescriptor}. * @param labelKeys the label keys associated with the {@code MetricDescriptor}. * @return a {@code MetricDescriptor}. - * @since 0.16 + * @since 0.17 */ public static MetricDescriptor create( String name, String description, String unit, Type type, List labelKeys) { @@ -63,7 +63,7 @@ public abstract class MetricDescriptor { * Returns the metric descriptor name. * * @return the metric descriptor name. - * @since 0.16 + * @since 0.17 */ public abstract String getName(); @@ -71,7 +71,7 @@ public abstract class MetricDescriptor { * Returns the description of this metric descriptor. * * @return the description of this metric descriptor. - * @since 0.16 + * @since 0.17 */ public abstract String getDescription(); @@ -79,7 +79,7 @@ public abstract class MetricDescriptor { * Returns the unit of this metric descriptor. * * @return the unit of this metric descriptor. - * @since 0.16 + * @since 0.17 */ public abstract String getUnit(); @@ -87,7 +87,7 @@ public abstract class MetricDescriptor { * Returns the type of this metric descriptor. * * @return the type of this metric descriptor. - * @since 0.16 + * @since 0.17 */ public abstract Type getType(); @@ -95,7 +95,7 @@ public abstract class MetricDescriptor { * Returns the label keys associated with this metric descriptor. * * @return the label keys associated with this metric descriptor. - * @since 0.16 + * @since 0.17 */ public abstract List getLabelKeys(); @@ -108,42 +108,42 @@ public abstract class MetricDescriptor { * cumulative measurements should have the same start time and increasing end times, until an * event resets the cumulative value to zero and sets a new start time for the following points. * - * @since 0.16 + * @since 0.17 */ public enum Type { /** * An instantaneous measurement of an int64 value. * - * @since 0.16 + * @since 0.17 */ GAUGE_INT64, /** * An instantaneous measurement of a double value. * - * @since 0.16 + * @since 0.17 */ GAUGE_DOUBLE, /** * An cumulative measurement of an int64 value. * - * @since 0.16 + * @since 0.17 */ CUMULATIVE_INT64, /** * An cumulative measurement of a double value. * - * @since 0.16 + * @since 0.17 */ CUMULATIVE_DOUBLE, /** * An cumulative measurement of a distribution value. * - * @since 0.16 + * @since 0.17 */ CUMULATIVE_DISTRIBUTION, } diff --git a/api/src/main/java/io/opencensus/metrics/MetricProducer.java b/api/src/main/java/io/opencensus/metrics/MetricProducer.java index 2a78b989..86f9732f 100644 --- a/api/src/main/java/io/opencensus/metrics/MetricProducer.java +++ b/api/src/main/java/io/opencensus/metrics/MetricProducer.java @@ -35,6 +35,7 @@ public abstract class MetricProducer { * Returns a collection of produced {@link Metric}s to be exported. * * @return a collection of produced {@link Metric}s to be exported. + * @since 0.17 */ public abstract Collection getMetrics(); } diff --git a/api/src/main/java/io/opencensus/metrics/Metrics.java b/api/src/main/java/io/opencensus/metrics/Metrics.java index 521fbd08..920a4a88 100644 --- a/api/src/main/java/io/opencensus/metrics/Metrics.java +++ b/api/src/main/java/io/opencensus/metrics/Metrics.java @@ -27,7 +27,7 @@ import javax.annotation.Nullable; /** * Class for accessing the default {@link MetricsComponent}. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi public final class Metrics { @@ -39,7 +39,7 @@ public final class Metrics { * Returns the global {@link ExportComponent}. * * @return the global {@code ExportComponent}. - * @since 0.16 + * @since 0.17 */ public static ExportComponent getExportComponent() { return metricsComponent.getExportComponent(); @@ -52,7 +52,7 @@ public final class Metrics { * io.opencensus.metrics.export.MetricProducerManager}. * * @return the global {@code MetricRegistry}. - * @since 0.16 + * @since 0.17 */ public static MetricRegistry getMetricRegistry() { return metricsComponent.getMetricRegistry(); diff --git a/api/src/main/java/io/opencensus/metrics/MetricsComponent.java b/api/src/main/java/io/opencensus/metrics/MetricsComponent.java index 08d954ef..3a992306 100644 --- a/api/src/main/java/io/opencensus/metrics/MetricsComponent.java +++ b/api/src/main/java/io/opencensus/metrics/MetricsComponent.java @@ -22,7 +22,7 @@ import io.opencensus.metrics.export.ExportComponent; /** * Class that holds the implementation instance for {@link ExportComponent}. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi public abstract class MetricsComponent { @@ -32,7 +32,7 @@ public abstract class MetricsComponent { * provided then no-op implementations will be used. * * @return the {@link ExportComponent} implementation. - * @since 0.16 + * @since 0.17 */ public abstract ExportComponent getExportComponent(); @@ -40,7 +40,7 @@ public abstract class MetricsComponent { * Returns the {@link MetricRegistry} with the provided implementation. * * @return the {@link MetricRegistry} implementation. - * @since 0.16 + * @since 0.17 */ public abstract MetricRegistry getMetricRegistry(); diff --git a/api/src/main/java/io/opencensus/metrics/Point.java b/api/src/main/java/io/opencensus/metrics/Point.java index e66b273d..9ef7c15b 100644 --- a/api/src/main/java/io/opencensus/metrics/Point.java +++ b/api/src/main/java/io/opencensus/metrics/Point.java @@ -24,7 +24,7 @@ import javax.annotation.concurrent.Immutable; /** * A timestamped measurement of a {@code TimeSeries}. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @AutoValue @@ -39,7 +39,7 @@ public abstract class Point { * @param value the {@link Value} of this {@link Point}. * @param timestamp the {@link Timestamp} when this {@link Point} was recorded. * @return a {@code Point}. - * @since 0.16 + * @since 0.17 */ public static Point create(Value value, Timestamp timestamp) { return new AutoValue_Point(value, timestamp); @@ -49,7 +49,7 @@ public abstract class Point { * Returns the {@link Value}. * * @return the {@code Value}. - * @since 0.16 + * @since 0.17 */ public abstract Value getValue(); @@ -57,7 +57,7 @@ public abstract class Point { * Returns the {@link Timestamp} when this {@link Point} was recorded. * * @return the {@code Timestamp}. - * @since 0.16 + * @since 0.17 */ public abstract Timestamp getTimestamp(); } diff --git a/api/src/main/java/io/opencensus/metrics/TimeSeries.java b/api/src/main/java/io/opencensus/metrics/TimeSeries.java index c62b6b72..d504dad9 100644 --- a/api/src/main/java/io/opencensus/metrics/TimeSeries.java +++ b/api/src/main/java/io/opencensus/metrics/TimeSeries.java @@ -29,7 +29,7 @@ import javax.annotation.concurrent.Immutable; /** * A collection of data points that describes the time-varying values of a {@code Metric}. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @Immutable @@ -46,7 +46,7 @@ public abstract class TimeSeries { * @param startTimestamp the start {@code Timestamp} of this {@code TimeSeries}. Must be non-null * for cumulative {@code Point}s. * @return a {@code TimeSeries}. - * @since 0.16 + * @since 0.17 */ public static TimeSeries create( List labelValues, List points, @Nullable Timestamp startTimestamp) { @@ -70,7 +70,7 @@ public abstract class TimeSeries { * MetricDescriptor}. * * @return the {@code LabelValue}s. - * @since 0.16 + * @since 0.17 */ public abstract List getLabelValues(); @@ -78,7 +78,7 @@ public abstract class TimeSeries { * Returns the data {@link Point}s of this {@link TimeSeries}. * * @return the data {@code Point}s. - * @since 0.16 + * @since 0.17 */ public abstract List getPoints(); @@ -87,7 +87,7 @@ public abstract class TimeSeries { * cumulative, or {@code null} if the {@link Point}s are gauge. * * @return the start {@code Timestamp} or {@code null}. - * @since 0.16 + * @since 0.17 */ @Nullable public abstract Timestamp getStartTimestamp(); diff --git a/api/src/main/java/io/opencensus/metrics/Value.java b/api/src/main/java/io/opencensus/metrics/Value.java index c8fe48f8..5dd70c8d 100644 --- a/api/src/main/java/io/opencensus/metrics/Value.java +++ b/api/src/main/java/io/opencensus/metrics/Value.java @@ -34,7 +34,7 @@ import javax.annotation.concurrent.Immutable; * *

Each {@link Point} contains exactly one of the three {@link Value} types. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @Immutable @@ -47,7 +47,7 @@ public abstract class Value { * * @param value value in double. * @return a double {@code Value}. - * @since 0.16 + * @since 0.17 */ public static Value doubleValue(double value) { return ValueDouble.create(value); @@ -58,7 +58,7 @@ public abstract class Value { * * @param value value in long. * @return a long {@code Value}. - * @since 0.16 + * @since 0.17 */ public static Value longValue(long value) { return ValueLong.create(value); @@ -69,7 +69,7 @@ public abstract class Value { * * @param value value in {@link Distribution}. * @return a {@code Distribution} {@code Value}. - * @since 0.16 + * @since 0.17 */ public static Value distributionValue(Distribution value) { return ValueDistribution.create(value); @@ -78,7 +78,7 @@ public abstract class Value { /** * Applies the given match function to the underlying data type. * - * @since 0.16 + * @since 0.17 */ public abstract T match( Function doubleFunction, diff --git a/api/src/main/java/io/opencensus/metrics/export/ExportComponent.java b/api/src/main/java/io/opencensus/metrics/export/ExportComponent.java index bab65d13..11e1fdbd 100644 --- a/api/src/main/java/io/opencensus/metrics/export/ExportComponent.java +++ b/api/src/main/java/io/opencensus/metrics/export/ExportComponent.java @@ -23,7 +23,7 @@ import io.opencensus.common.ExperimentalApi; * *

Unless otherwise noted all methods (on component) results are cacheable. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi public abstract class ExportComponent { @@ -31,7 +31,7 @@ public abstract class ExportComponent { * Returns the no-op implementation of the {@code ExportComponent}. * * @return the no-op implementation of the {@code ExportComponent}. - * @since 0.16 + * @since 0.17 */ public static ExportComponent newNoopExportComponent() { return new NoopExportComponent(); @@ -43,7 +43,7 @@ public abstract class ExportComponent { * * @return the implementation of the {@code MetricExporter} or no-op if no implementation linked * in the binary. - * @since 0.16 + * @since 0.17 */ public abstract MetricProducerManager getMetricProducerManager(); diff --git a/api/src/main/java/io/opencensus/metrics/export/MetricProducerManager.java b/api/src/main/java/io/opencensus/metrics/export/MetricProducerManager.java index c5acf174..fc864200 100644 --- a/api/src/main/java/io/opencensus/metrics/export/MetricProducerManager.java +++ b/api/src/main/java/io/opencensus/metrics/export/MetricProducerManager.java @@ -27,7 +27,7 @@ import javax.annotation.concurrent.ThreadSafe; * Keeps a set of {@link MetricProducer} that is used by exporters to determine the metrics that * need to be exported. * - * @since 0.16 + * @since 0.17 */ @ExperimentalApi @ThreadSafe @@ -37,7 +37,7 @@ public abstract class MetricProducerManager { * Adds the {@link MetricProducer} to the manager if it is not already present. * * @param metricProducer the {@code MetricProducer} to be added to the manager. - * @since 0.16 + * @since 0.17 */ public abstract void add(MetricProducer metricProducer); @@ -45,7 +45,7 @@ public abstract class MetricProducerManager { * Removes the {@link MetricProducer} to the manager if it is present. * * @param metricProducer the {@code MetricProducer} to be removed from the manager. - * @since 0.16 + * @since 0.17 */ public abstract void remove(MetricProducer metricProducer); @@ -56,7 +56,7 @@ public abstract class MetricProducerManager { * {@code MetricProducer} registered with the {@code MetricProducerManager}. * * @return all registered {@code MetricProducer}s that should be exported. - * @since 0.16 + * @since 0.17 */ public abstract Set getAllMetricProducer(); -- cgit v1.2.3