SDK: Remove Javadocs since tags (for pre 1.0 release) (#1650)

* Add since for SDK (corresponding to the version in API)

* Add since based on release branches

* Remove all since tags in SDK
This commit is contained in:
Jason Liu 2020-09-16 21:09:08 -07:00 committed by GitHub
parent 8470d6aaad
commit 51e93f7273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 21 additions and 162 deletions

View File

@ -38,7 +38,6 @@ public final class OpenTelemetrySdk {
* Returns a {@link TracerSdkProvider}. * Returns a {@link TracerSdkProvider}.
* *
* @return TracerProvider returned by {@link OpenTelemetry#getTracerProvider()}. * @return TracerProvider returned by {@link OpenTelemetry#getTracerProvider()}.
* @since 0.1.0
*/ */
public static TracerSdkProvider getTracerProvider() { public static TracerSdkProvider getTracerProvider() {
return (TracerSdkProvider) ((Obfuscated<?>) OpenTelemetry.getTracerProvider()).unobfuscate(); return (TracerSdkProvider) ((Obfuscated<?>) OpenTelemetry.getTracerProvider()).unobfuscate();
@ -48,7 +47,6 @@ public final class OpenTelemetrySdk {
* Returns a {@link MeterSdkProvider}. * Returns a {@link MeterSdkProvider}.
* *
* @return MeterProvider returned by {@link OpenTelemetry#getMeterProvider()}. * @return MeterProvider returned by {@link OpenTelemetry#getMeterProvider()}.
* @since 0.1.0
*/ */
public static MeterSdkProvider getMeterProvider() { public static MeterSdkProvider getMeterProvider() {
return (MeterSdkProvider) OpenTelemetry.getMeterProvider(); return (MeterSdkProvider) OpenTelemetry.getMeterProvider();
@ -58,7 +56,6 @@ public final class OpenTelemetrySdk {
* Returns a {@link CorrelationContextManagerSdk}. * Returns a {@link CorrelationContextManagerSdk}.
* *
* @return context manager returned by {@link OpenTelemetry#getCorrelationContextManager()}. * @return context manager returned by {@link OpenTelemetry#getCorrelationContextManager()}.
* @since 0.1.0
*/ */
public static CorrelationContextManagerSdk getCorrelationContextManager() { public static CorrelationContextManagerSdk getCorrelationContextManager() {
return (CorrelationContextManagerSdk) OpenTelemetry.getCorrelationContextManager(); return (CorrelationContextManagerSdk) OpenTelemetry.getCorrelationContextManager();

View File

@ -16,17 +16,12 @@
package io.opentelemetry.sdk.common; package io.opentelemetry.sdk.common;
/** /** Interface for getting the current time. */
* Interface for getting the current time.
*
* @since 0.1.0
*/
public interface Clock { public interface Clock {
/** /**
* Obtains the current epoch timestamp in nanos from this clock. * Obtains the current epoch timestamp in nanos from this clock.
* *
* @return the current epoch timestamp in nanos. * @return the current epoch timestamp in nanos.
* @since 0.1.0
*/ */
long now(); long now();
@ -36,7 +31,6 @@ public interface Clock {
* *
* @return a time measurement with nanosecond precision that can only be used to calculate elapsed * @return a time measurement with nanosecond precision that can only be used to calculate elapsed
* time. * time.
* @since 0.1.0
*/ */
long nanoTime(); long nanoTime();
} }

View File

@ -21,11 +21,7 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.ThreadSafe; import javax.annotation.concurrent.ThreadSafe;
/** /** A mutable {@link Clock} that allows the time to be set for testing. */
* A mutable {@link Clock} that allows the time to be set for testing.
*
* @since 0.1.0
*/
@ThreadSafe @ThreadSafe
public class TestClock implements Clock { public class TestClock implements Clock {
@ -40,7 +36,6 @@ public class TestClock implements Clock {
* Creates a clock initialized to a constant non-zero time. * Creates a clock initialized to a constant non-zero time.
* *
* @return a clock initialized to a constant non-zero time. * @return a clock initialized to a constant non-zero time.
* @since 0.1.0
*/ */
public static TestClock create() { public static TestClock create() {
// Set Time to Tuesday, May 7, 2019 12:00:00 AM GMT-07:00 DST // Set Time to Tuesday, May 7, 2019 12:00:00 AM GMT-07:00 DST
@ -52,7 +47,6 @@ public class TestClock implements Clock {
* *
* @param epochNanos the initial time in nanos since epoch. * @param epochNanos the initial time in nanos since epoch.
* @return a new {@code TestClock} with the given time. * @return a new {@code TestClock} with the given time.
* @since 0.1.0
*/ */
public static TestClock create(long epochNanos) { public static TestClock create(long epochNanos) {
return new TestClock(epochNanos); return new TestClock(epochNanos);
@ -62,7 +56,6 @@ public class TestClock implements Clock {
* Sets the time. * Sets the time.
* *
* @param epochNanos the new time. * @param epochNanos the new time.
* @since 0.1.0
*/ */
public synchronized void setTime(long epochNanos) { public synchronized void setTime(long epochNanos) {
currentEpochNanos = epochNanos; currentEpochNanos = epochNanos;
@ -72,7 +65,6 @@ public class TestClock implements Clock {
* Advances the time by millis and mutates this instance. * Advances the time by millis and mutates this instance.
* *
* @param millis the increase in time. * @param millis the increase in time.
* @since 0.1.0
*/ */
public synchronized void advanceMillis(long millis) { public synchronized void advanceMillis(long millis) {
long nanos = TimeUnit.MILLISECONDS.toNanos(millis); long nanos = TimeUnit.MILLISECONDS.toNanos(millis);
@ -83,7 +75,6 @@ public class TestClock implements Clock {
* Advances the time by nanos and mutates this instance. * Advances the time by nanos and mutates this instance.
* *
* @param nanos the increase in time. * @param nanos the increase in time.
* @since 0.1.0
*/ */
public synchronized void advanceNanos(long nanos) { public synchronized void advanceNanos(long nanos) {
currentEpochNanos += nanos; currentEpochNanos += nanos;

View File

@ -26,8 +26,6 @@ import javax.annotation.concurrent.ThreadSafe;
/** /**
* Provides a framework for detection of resource information from the environment variable * Provides a framework for detection of resource information from the environment variable
* "OTEL_RESOURCE_ATTRIBUTES" and system properties "otel.resource.attributes". * "OTEL_RESOURCE_ATTRIBUTES" and system properties "otel.resource.attributes".
*
* @since 0.1.0
*/ */
@ThreadSafe @ThreadSafe
final class EnvAutodetectResource { final class EnvAutodetectResource {

View File

@ -33,8 +33,6 @@ import javax.annotation.concurrent.Immutable;
/** /**
* {@link Resource} represents a resource, which capture identifying information about the entities * {@link Resource} represents a resource, which capture identifying information about the entities
* for which signals (stats or traces) are reported. * for which signals (stats or traces) are reported.
*
* @since 0.1.0
*/ */
@Immutable @Immutable
@AutoValue @AutoValue
@ -96,7 +94,6 @@ public abstract class Resource {
* Returns an empty {@link Resource}. * Returns an empty {@link Resource}.
* *
* @return an empty {@code Resource}. * @return an empty {@code Resource}.
* @since 0.1.0
*/ */
public static Resource getEmpty() { public static Resource getEmpty() {
return EMPTY; return EMPTY;
@ -106,7 +103,6 @@ public abstract class Resource {
* Returns the telemetry sdk {@link Resource}. * Returns the telemetry sdk {@link Resource}.
* *
* @return a {@code Resource} with telemetry sdk attributes. * @return a {@code Resource} with telemetry sdk attributes.
* @since 0.6.0
*/ */
public static Resource getTelemetrySdk() { public static Resource getTelemetrySdk() {
return TELEMETRY_SDK; return TELEMETRY_SDK;
@ -116,7 +112,6 @@ public abstract class Resource {
* Returns a map of attributes that describe the resource. * Returns a map of attributes that describe the resource.
* *
* @return a map of attributes. * @return a map of attributes.
* @since 0.1.0
*/ */
public abstract ReadableAttributes getAttributes(); public abstract ReadableAttributes getAttributes();
@ -132,7 +127,6 @@ public abstract class Resource {
* @throws NullPointerException if {@code attributes} is null. * @throws NullPointerException if {@code attributes} is null.
* @throws IllegalArgumentException if attribute key or attribute value is not a valid printable * @throws IllegalArgumentException if attribute key or attribute value is not a valid printable
* ASCII string or exceed {@link #MAX_LENGTH} characters. * ASCII string or exceed {@link #MAX_LENGTH} characters.
* @since 0.1.0
*/ */
public static Resource create(Attributes attributes) { public static Resource create(Attributes attributes) {
checkAttributes(Objects.requireNonNull(attributes, "attributes")); checkAttributes(Objects.requireNonNull(attributes, "attributes"));
@ -155,7 +149,6 @@ public abstract class Resource {
* *
* @param other the {@code Resource} that will be merged with {@code this}. * @param other the {@code Resource} that will be merged with {@code this}.
* @return the newly merged {@code Resource}. * @return the newly merged {@code Resource}.
* @since 0.1.0
*/ */
public Resource merge(@Nullable Resource other) { public Resource merge(@Nullable Resource other) {
if (other == null) { if (other == null) {

View File

@ -22,12 +22,13 @@ import java.util.Collections;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
// Basic registry class for metrics instruments. The current implementation allows instruments to be /**
// registered only once for a given name. * Basic registry class for metrics instruments. The current implementation allows instruments to be
// * registered only once for a given name.
// TODO: Discuss what is the right behavior when an already registered Instrument with the same name *
// is present. * <p>TODO: Discuss what is the right behavior when an already registered Instrument with the same
// TODO: Decide what is the identifier for an Instrument? Only name? * name is present. TODO: Decide what is the identifier for an Instrument? Only name?
*/
final class InstrumentRegistry { final class InstrumentRegistry {
private final ConcurrentMap<String, AbstractInstrument> registry = new ConcurrentHashMap<>(); private final ConcurrentMap<String, AbstractInstrument> registry = new ConcurrentHashMap<>();

View File

@ -87,8 +87,6 @@ public final class MeterSdkProvider implements MeterProvider {
/** /**
* Builder class for the {@link MeterSdkProvider}. Has fully functional default implementations of * Builder class for the {@link MeterSdkProvider}. Has fully functional default implementations of
* all three required interfaces. * all three required interfaces.
*
* @since 0.4.0
*/ */
public static final class Builder { public static final class Builder {

View File

@ -26,8 +26,6 @@ import javax.annotation.concurrent.Immutable;
/** /**
* A {@link MetricData} represents the data exported as part of aggregating one {@code Instrument}. * A {@link MetricData} represents the data exported as part of aggregating one {@code Instrument}.
*
* @since 0.1.0
*/ */
@Immutable @Immutable
@AutoValue @AutoValue
@ -38,7 +36,6 @@ public abstract class MetricData {
* Returns the {@link Descriptor} of this metric. * Returns the {@link Descriptor} of this metric.
* *
* @return the {@code Descriptor} of this metric. * @return the {@code Descriptor} of this metric.
* @since 0.1.0
*/ */
public abstract Descriptor getDescriptor(); public abstract Descriptor getDescriptor();
@ -46,7 +43,6 @@ public abstract class MetricData {
* Returns the resource of this {@code MetricData}. * Returns the resource of this {@code MetricData}.
* *
* @return the resource of this {@code MetricData}. * @return the resource of this {@code MetricData}.
* @since 0.1.0
*/ */
public abstract Resource getResource(); public abstract Resource getResource();
@ -65,7 +61,6 @@ public abstract class MetricData {
* is determined by the {@link Descriptor.Type}. * is determined by the {@link Descriptor.Type}.
* *
* @return the data {@link Point}s for this metric, or empty {@code Collection} if no points. * @return the data {@link Point}s for this metric, or empty {@code Collection} if no points.
* @since 0.3.0
*/ */
public abstract Collection<Point> getPoints(); public abstract Collection<Point> getPoints();
@ -86,7 +81,6 @@ public abstract class MetricData {
* the metric was created or an aggregation was enabled. * the metric was created or an aggregation was enabled.
* *
* @return the start epoch timestamp in nanos. * @return the start epoch timestamp in nanos.
* @since 0.3.0
*/ */
public abstract long getStartEpochNanos(); public abstract long getStartEpochNanos();
@ -95,7 +89,6 @@ public abstract class MetricData {
* moment when {@code Instrument.getData()} was called. * moment when {@code Instrument.getData()} was called.
* *
* @return the epoch timestamp in nanos. * @return the epoch timestamp in nanos.
* @since 0.3.0
*/ */
public abstract long getEpochNanos(); public abstract long getEpochNanos();
@ -221,50 +214,26 @@ public abstract class MetricData {
} }
} }
/** /** {@link Descriptor} defines metadata about the {@code MetricData} type and its schema. */
* {@link Descriptor} defines metadata about the {@code MetricData} type and its schema.
*
* @since 0.1.0
*/
@Immutable @Immutable
@AutoValue @AutoValue
public abstract static class Descriptor { public abstract static class Descriptor {
Descriptor() {} Descriptor() {}
/** /** The kind of metric. It describes how the data is reported. */
* The kind of metric. It describes how the data is reported.
*
* @since 0.1.0
*/
public enum Type { public enum Type {
/** /** An instantaneous measurement of a long (int64) value. Reports {@link LongPoint} points. */
* An instantaneous measurement of a long (int64) value. Reports {@link LongPoint} points.
*
* @since 0.1.0
*/
NON_MONOTONIC_LONG, NON_MONOTONIC_LONG,
/** /** An instantaneous measurement of a double value. Reports {@link DoublePoint} points. */
* An instantaneous measurement of a double value. Reports {@link DoublePoint} points.
*
* @since 0.1.0
*/
NON_MONOTONIC_DOUBLE, NON_MONOTONIC_DOUBLE,
/** /** An cumulative measurement of an long (int64) value. Reports {@link LongPoint} points. */
* An cumulative measurement of an long (int64) value. Reports {@link LongPoint} points.
*
* @since 0.1.0
*/
MONOTONIC_LONG, MONOTONIC_LONG,
/** /** An cumulative measurement of a double value. Reports {@link DoublePoint} points. */
* An cumulative measurement of a double value. Reports {@link DoublePoint} points.
*
* @since 0.1.0
*/
MONOTONIC_DOUBLE, MONOTONIC_DOUBLE,
/** /**
@ -279,7 +248,6 @@ public abstract class MetricData {
* Returns the metric descriptor name. * Returns the metric descriptor name.
* *
* @return the metric descriptor name. * @return the metric descriptor name.
* @since 0.1.0
*/ */
public abstract String getName(); public abstract String getName();
@ -287,7 +255,6 @@ public abstract class MetricData {
* Returns the description of this metric descriptor. * Returns the description of this metric descriptor.
* *
* @return the description of this metric descriptor. * @return the description of this metric descriptor.
* @since 0.1.0
*/ */
public abstract String getDescription(); public abstract String getDescription();
@ -295,7 +262,6 @@ public abstract class MetricData {
* Returns the unit of this metric descriptor. * Returns the unit of this metric descriptor.
* *
* @return the unit of this metric descriptor. * @return the unit of this metric descriptor.
* @since 0.1.0
*/ */
public abstract String getUnit(); public abstract String getUnit();
@ -303,7 +269,6 @@ public abstract class MetricData {
* Returns the type of this metric descriptor. * Returns the type of this metric descriptor.
* *
* @return the type of this metric descriptor. * @return the type of this metric descriptor.
* @since 0.1.0
*/ */
public abstract Type getType(); public abstract Type getType();
@ -311,7 +276,6 @@ public abstract class MetricData {
* Returns the constant labels associated with this metric descriptor. * Returns the constant labels associated with this metric descriptor.
* *
* @return the constant labels associated with this metric descriptor. * @return the constant labels associated with this metric descriptor.
* @since 0.1.0
*/ */
public abstract Labels getConstantLabels(); public abstract Labels getConstantLabels();

View File

@ -55,8 +55,6 @@ import javax.annotation.concurrent.Immutable;
* <ul> * <ul>
* <li>{@code OTEL_IMR_EXPORT_INTERVAL}: sets the export interval between pushes to the exporter. * <li>{@code OTEL_IMR_EXPORT_INTERVAL}: sets the export interval between pushes to the exporter.
* </ul> * </ul>
*
* @since 0.3.0
*/ */
public final class IntervalMetricReader { public final class IntervalMetricReader {
private static final Logger logger = Logger.getLogger(IntervalMetricReader.class.getName()); private static final Logger logger = Logger.getLogger(IntervalMetricReader.class.getName());
@ -64,11 +62,7 @@ public final class IntervalMetricReader {
private final Exporter exporter; private final Exporter exporter;
private final ScheduledExecutorService scheduler; private final ScheduledExecutorService scheduler;
/** /** Stops the scheduled task and calls export one more time. */
* Stops the scheduled task and calls export one more time.
*
* @since 0.3.0
*/
public void shutdown() { public void shutdown() {
scheduler.shutdown(); scheduler.shutdown();
try { try {
@ -105,11 +99,7 @@ public final class IntervalMetricReader {
return builder().readEnvironmentVariables().readSystemProperties(); return builder().readEnvironmentVariables().readSystemProperties();
} }
/** /** Builder for {@link IntervalMetricReader}. */
* Builder for {@link IntervalMetricReader}.
*
* @since 0.3.0
*/
public static final class Builder extends ConfigBuilder<Builder> { public static final class Builder extends ConfigBuilder<Builder> {
private final InternalState.Builder optionsBuilder; private final InternalState.Builder optionsBuilder;
private static final String KEY_EXPORT_INTERVAL = "otel.imr.export.interval"; private static final String KEY_EXPORT_INTERVAL = "otel.imr.export.interval";
@ -123,7 +113,6 @@ public final class IntervalMetricReader {
* *
* @param exportIntervalMillis the export interval between pushes to the exporter. * @param exportIntervalMillis the export interval between pushes to the exporter.
* @return this. * @return this.
* @since 0.3.0
*/ */
public Builder setExportIntervalMillis(long exportIntervalMillis) { public Builder setExportIntervalMillis(long exportIntervalMillis) {
optionsBuilder.setExportIntervalMillis(exportIntervalMillis); optionsBuilder.setExportIntervalMillis(exportIntervalMillis);
@ -135,7 +124,6 @@ public final class IntervalMetricReader {
* *
* @param metricExporter the {@link MetricExporter} to be called when export metrics. * @param metricExporter the {@link MetricExporter} to be called when export metrics.
* @return this. * @return this.
* @since 0.3.0
*/ */
public Builder setMetricExporter(MetricExporter metricExporter) { public Builder setMetricExporter(MetricExporter metricExporter) {
optionsBuilder.setMetricExporter(metricExporter); optionsBuilder.setMetricExporter(metricExporter);
@ -148,7 +136,6 @@ public final class IntervalMetricReader {
* @param metricProducers a collection of {@link MetricProducer} from where the metrics should * @param metricProducers a collection of {@link MetricProducer} from where the metrics should
* be read. * be read.
* @return this. * @return this.
* @since 0.3.0
*/ */
public Builder setMetricProducers(Collection<MetricProducer> metricProducers) { public Builder setMetricProducers(Collection<MetricProducer> metricProducers) {
optionsBuilder.setMetricProducers(metricProducers); optionsBuilder.setMetricProducers(metricProducers);
@ -159,7 +146,6 @@ public final class IntervalMetricReader {
* Builds a new {@link IntervalMetricReader} with current settings. * Builds a new {@link IntervalMetricReader} with current settings.
* *
* @return a {@code IntervalMetricReader}. * @return a {@code IntervalMetricReader}.
* @since 0.3.0
*/ */
public IntervalMetricReader build() { public IntervalMetricReader build() {
InternalState internalState = optionsBuilder.build(); InternalState internalState = optionsBuilder.build();

View File

@ -25,8 +25,6 @@ import java.util.Collection;
* export metrics to the OpenTelemetry exporters. * export metrics to the OpenTelemetry exporters.
* *
* <p>All OpenTelemetry exporters should allow access to a {@code MetricExporter} instance. * <p>All OpenTelemetry exporters should allow access to a {@code MetricExporter} instance.
*
* @since 0.1.0
*/ */
public interface MetricExporter { public interface MetricExporter {

View File

@ -26,8 +26,6 @@ import javax.annotation.concurrent.ThreadSafe;
* #collectAllMetrics()} will return any metric generated since the last call was made. * #collectAllMetrics()} will return any metric generated since the last call was made.
* *
* <p>Implementations must be thread-safe. * <p>Implementations must be thread-safe.
*
* @since 0.3.0
*/ */
@ThreadSafe @ThreadSafe
public interface MetricProducer { public interface MetricProducer {
@ -36,7 +34,6 @@ public interface MetricProducer {
* metrics that have been produced since the last time this method was called. * metrics that have been produced since the last time this method was called.
* *
* @return a collection of produced {@link MetricData}s to be exported. * @return a collection of produced {@link MetricData}s to be exported.
* @since 0.17
*/ */
Collection<MetricData> collectAllMetrics(); Collection<MetricData> collectAllMetrics();
} }

View File

@ -25,8 +25,6 @@ import javax.annotation.concurrent.Immutable;
/** /**
* {@link Aggregation} is the process of combining a certain set of recorded measurements for a * {@link Aggregation} is the process of combining a certain set of recorded measurements for a
* given {@code Instrument} into the equivalent {@code MetricData}. * given {@code Instrument} into the equivalent {@code MetricData}.
*
* @since 0.1.0
*/ */
@Immutable @Immutable
public interface Aggregation { public interface Aggregation {

View File

@ -35,7 +35,6 @@ public class Aggregations {
* Returns an {@code Aggregation} that calculates sum of recorded measurements. * Returns an {@code Aggregation} that calculates sum of recorded measurements.
* *
* @return an {@code Aggregation} that calculates sum of recorded measurements. * @return an {@code Aggregation} that calculates sum of recorded measurements.
* @since 0.1.0
*/ */
public static Aggregation sum() { public static Aggregation sum() {
return Sum.INSTANCE; return Sum.INSTANCE;
@ -47,7 +46,6 @@ public class Aggregations {
* *
* @return an {@code Aggregation} that calculates count of recorded measurements (the number of * @return an {@code Aggregation} that calculates count of recorded measurements (the number of
* recorded * measurements). * recorded * measurements).
* @since 0.1.0
*/ */
public static Aggregation count() { public static Aggregation count() {
return Count.INSTANCE; return Count.INSTANCE;
@ -61,7 +59,6 @@ public class Aggregations {
* *
* @param bucketBoundaries bucket boundaries to use for distribution. * @param bucketBoundaries bucket boundaries to use for distribution.
* @return an {@code Aggregation} that calculates distribution stats on recorded measurements. * @return an {@code Aggregation} that calculates distribution stats on recorded measurements.
* @since 0.1.0
*/ */
public static Aggregation distributionWithExplicitBounds(Double... bucketBoundaries) { public static Aggregation distributionWithExplicitBounds(Double... bucketBoundaries) {
return new Distribution(bucketBoundaries); return new Distribution(bucketBoundaries);
@ -71,7 +68,6 @@ public class Aggregations {
* Returns an {@code Aggregation} that calculates the last value of all recorded measurements. * Returns an {@code Aggregation} that calculates the last value of all recorded measurements.
* *
* @return an {@code Aggregation} that calculates the last value of all recorded measurements. * @return an {@code Aggregation} that calculates the last value of all recorded measurements.
* @since 0.1.0
*/ */
public static Aggregation lastValue() { public static Aggregation lastValue() {
return LastValue.INSTANCE; return LastValue.INSTANCE;
@ -83,7 +79,6 @@ public class Aggregations {
* value recorded and the minimum value recorded. * value recorded and the minimum value recorded.
* *
* @return an {@code Aggregation} that calculates a simple summary of all recorded measurements. * @return an {@code Aggregation} that calculates a simple summary of all recorded measurements.
* @since 0.3.0
*/ */
public static Aggregation minMaxSumCount() { public static Aggregation minMaxSumCount() {
return MinMaxSumCount.INSTANCE; return MinMaxSumCount.INSTANCE;

View File

@ -30,7 +30,6 @@ public interface ReadableSpan {
* <p>Equivalent with {@link Span#getContext()}. * <p>Equivalent with {@link Span#getContext()}.
* *
* @return the {@link SpanContext} of the {@code Span}. * @return the {@link SpanContext} of the {@code Span}.
* @since 0.1.0
*/ */
SpanContext getSpanContext(); SpanContext getSpanContext();
@ -41,7 +40,6 @@ public interface ReadableSpan {
* Span#updateName(String)} so this value cannot be cached. * Span#updateName(String)} so this value cannot be cached.
* *
* @return the name of the {@code Span}. * @return the name of the {@code Span}.
* @since 0.1.0
*/ */
String getName(); String getName();
@ -49,7 +47,6 @@ public interface ReadableSpan {
* This converts this instance into an immutable SpanData instance, for use in export. * This converts this instance into an immutable SpanData instance, for use in export.
* *
* @return an immutable {@link SpanData} instance. * @return an immutable {@link SpanData} instance.
* @since 0.1.0
*/ */
SpanData toSpanData(); SpanData toSpanData();
@ -66,7 +63,6 @@ public interface ReadableSpan {
* Returns whether this Span has already been ended. * Returns whether this Span has already been ended.
* *
* @return {@code true} if the span has already been ended, {@code false} if not. * @return {@code true} if the span has already been ended, {@code false} if not.
* @since 0.4.0
*/ */
boolean hasEnded(); boolean hasEnded();
@ -75,7 +71,6 @@ public interface ReadableSpan {
* time. * time.
* *
* @return the latency of the {@code Span} in nanos. * @return the latency of the {@code Span} in nanos.
* @since 0.4.0
*/ */
long getLatencyNanos(); long getLatencyNanos();
} }

View File

@ -27,11 +27,7 @@ import io.opentelemetry.trace.TraceId;
import java.util.List; import java.util.List;
import javax.annotation.concurrent.ThreadSafe; import javax.annotation.concurrent.ThreadSafe;
/** /** Sampler is used to make decisions on {@link Span} sampling. */
* Sampler is used to make decisions on {@link Span} sampling.
*
* @since 0.1.0
*/
@ThreadSafe @ThreadSafe
public interface Sampler { public interface Sampler {
/** /**
@ -46,7 +42,6 @@ public interface Sampler {
* @param attributes list of {@link AttributeValue} with their keys. * @param attributes list of {@link AttributeValue} with their keys.
* @param parentLinks the parentLinks associated with the new {@code Span}. * @param parentLinks the parentLinks associated with the new {@code Span}.
* @return sampling samplingResult whether span should be sampled or not. * @return sampling samplingResult whether span should be sampled or not.
* @since 0.1.0
*/ */
SamplingResult shouldSample( SamplingResult shouldSample(
SpanContext parentContext, SpanContext parentContext,
@ -63,7 +58,6 @@ public interface Sampler {
* <p>Example: "ProbabilitySampler{0.000100}" * <p>Example: "ProbabilitySampler{0.000100}"
* *
* @return the description of this {@code Sampler}. * @return the description of this {@code Sampler}.
* @since 0.1.0
*/ */
String getDescription(); String getDescription();
@ -77,8 +71,6 @@ public interface Sampler {
/** /**
* Sampling result returned by {@link Sampler#shouldSample(SpanContext, String, String, Kind, * Sampling result returned by {@link Sampler#shouldSample(SpanContext, String, String, Kind,
* ReadableAttributes, List)}. * ReadableAttributes, List)}.
*
* @since 0.1.0
*/ */
interface SamplingResult { interface SamplingResult {
@ -86,7 +78,6 @@ public interface Sampler {
* Return decision on whether a span should be recorded, recorded and sampled or not recorded. * Return decision on whether a span should be recorded, recorded and sampled or not recorded.
* *
* @return sampling result. * @return sampling result.
* @since 0.7.0
*/ */
Decision getDecision(); Decision getDecision();
@ -96,7 +87,6 @@ public interface Sampler {
* @return attributes added to span. These attributes should be added to the span only when * @return attributes added to span. These attributes should be added to the span only when
* {@linkplain #getDecision() the sampling decision} is {@link Decision#RECORD} or {@link * {@linkplain #getDecision() the sampling decision} is {@link Decision#RECORD} or {@link
* Decision#RECORD_AND_SAMPLED}. * Decision#RECORD_AND_SAMPLED}.
* @since 0.1.0
*/ */
Attributes getAttributes(); Attributes getAttributes();
} }

View File

@ -35,11 +35,7 @@ import java.util.Objects;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable; import javax.annotation.concurrent.Immutable;
/** /** Static class to access a set of pre-defined {@link Sampler Samplers}. */
* Static class to access a set of pre-defined {@link Sampler Samplers}.
*
* @since 0.1.0
*/
@Immutable @Immutable
public final class Samplers { public final class Samplers {
@ -124,7 +120,6 @@ public final class Samplers {
* *
* @return a {@code Sampler} that always makes a "yes" {@link SamplingResult} for {@code Span} * @return a {@code Sampler} that always makes a "yes" {@link SamplingResult} for {@code Span}
* sampling. * sampling.
* @since 0.1.0
*/ */
public static Sampler alwaysOn() { public static Sampler alwaysOn() {
return AlwaysOnSampler.INSTANCE; return AlwaysOnSampler.INSTANCE;
@ -136,7 +131,6 @@ public final class Samplers {
* *
* @return a {@code Sampler} that always makes a "no" {@link SamplingResult} for {@code Span} * @return a {@code Sampler} that always makes a "no" {@link SamplingResult} for {@code Span}
* sampling. * sampling.
* @since 0.1.0
*/ */
public static Sampler alwaysOff() { public static Sampler alwaysOff() {
return AlwaysOffSampler.INSTANCE; return AlwaysOffSampler.INSTANCE;
@ -151,7 +145,6 @@ public final class Samplers {
* not exist. * not exist.
* @return a {@code Sampler} that follows the parent's sampling decision if one exists, otherwise * @return a {@code Sampler} that follows the parent's sampling decision if one exists, otherwise
* following the root sampler's decision. * following the root sampler's decision.
* @since 0.7.0
*/ */
public static Sampler parentBased(Sampler root) { public static Sampler parentBased(Sampler root) {
return parentBasedBuilder(root).build(); return parentBasedBuilder(root).build();
@ -164,7 +157,6 @@ public final class Samplers {
* @param root the required {@code Sampler} which is used to make the sampling decisions if the * @param root the required {@code Sampler} which is used to make the sampling decisions if the
* parent does not exist. * parent does not exist.
* @return a {@code ParentBased.Builder} * @return a {@code ParentBased.Builder}
* @since 0.8.0
*/ */
public static ParentBased.Builder parentBasedBuilder(Sampler root) { public static ParentBased.Builder parentBasedBuilder(Sampler root) {
return new ParentBased.Builder(root); return new ParentBased.Builder(root);

View File

@ -132,8 +132,6 @@ public class TracerSdkProvider implements TracerProvider {
/** /**
* Builder class for the TracerSdkFactory. Has fully functional default implementations of all * Builder class for the TracerSdkFactory. Has fully functional default implementations of all
* three required interfaces. * three required interfaces.
*
* @since 0.4.0
*/ */
public static class Builder { public static class Builder {

View File

@ -101,7 +101,6 @@ public abstract class TraceConfig {
* Returns the default {@code TraceConfig}. * Returns the default {@code TraceConfig}.
* *
* @return the default {@code TraceConfig}. * @return the default {@code TraceConfig}.
* @since 0.1.0
*/ */
public static TraceConfig getDefault() { public static TraceConfig getDefault() {
return DEFAULT; return DEFAULT;

View File

@ -23,8 +23,6 @@ import javax.annotation.concurrent.Immutable;
/** /**
* An immutable timed event representation. Enhances the core {@link io.opentelemetry.trace.Event} * An immutable timed event representation. Enhances the core {@link io.opentelemetry.trace.Event}
* by adding the time at which the event occurred. * by adding the time at which the event occurred.
*
* @since 0.1.0
*/ */
@Immutable @Immutable
@AutoValue @AutoValue
@ -37,7 +35,6 @@ public abstract class EventImpl implements SpanData.Event {
* @param name the name of the {@code Event}. * @param name the name of the {@code Event}.
* @param attributes the attributes of the {@code Event}. * @param attributes the attributes of the {@code Event}.
* @return a new immutable {@code Event<T>} * @return a new immutable {@code Event<T>}
* @since 0.1.0
*/ */
public static EventImpl create(long epochNanos, String name, Attributes attributes) { public static EventImpl create(long epochNanos, String name, Attributes attributes) {
return new AutoValue_EventImpl(name, attributes, epochNanos, attributes.size()); return new AutoValue_EventImpl(name, attributes, epochNanos, attributes.size());
@ -51,7 +48,6 @@ public abstract class EventImpl implements SpanData.Event {
* @param attributes the attributes of the {@code Event}. * @param attributes the attributes of the {@code Event}.
* @param totalAttributeCount the total number of attributes for this {@code} Event. * @param totalAttributeCount the total number of attributes for this {@code} Event.
* @return a new immutable {@code Event<T>} * @return a new immutable {@code Event<T>}
* @since 0.1.0
*/ */
public static EventImpl create( public static EventImpl create(
long epochNanos, String name, Attributes attributes, int totalAttributeCount) { long epochNanos, String name, Attributes attributes, int totalAttributeCount) {

View File

@ -31,8 +31,6 @@ import javax.annotation.concurrent.Immutable;
/** /**
* Immutable representation of all data collected by the {@link io.opentelemetry.trace.Span} class. * Immutable representation of all data collected by the {@link io.opentelemetry.trace.Span} class.
*
* @since 0.1.0
*/ */
@Immutable @Immutable
public interface SpanData { public interface SpanData {
@ -66,7 +64,6 @@ public interface SpanData {
* returned will be invalid.. * returned will be invalid..
* *
* @return the parent {@code SpanId} or an invalid SpanId if this is a root {@code Span}. * @return the parent {@code SpanId} or an invalid SpanId if this is a root {@code Span}.
* @since 0.1.0
*/ */
String getParentSpanId(); String getParentSpanId();
@ -74,7 +71,6 @@ public interface SpanData {
* Returns the resource of this {@code Span}. * Returns the resource of this {@code Span}.
* *
* @return the resource of this {@code Span}. * @return the resource of this {@code Span}.
* @since 0.1.0
*/ */
Resource getResource(); Resource getResource();
@ -90,7 +86,6 @@ public interface SpanData {
* Returns the name of this {@code Span}. * Returns the name of this {@code Span}.
* *
* @return the name of this {@code Span}. * @return the name of this {@code Span}.
* @since 0.1.0
*/ */
String getName(); String getName();
@ -98,7 +93,6 @@ public interface SpanData {
* Returns the kind of this {@code Span}. * Returns the kind of this {@code Span}.
* *
* @return the kind of this {@code Span}. * @return the kind of this {@code Span}.
* @since 0.1.0
*/ */
Kind getKind(); Kind getKind();
@ -106,7 +100,6 @@ public interface SpanData {
* Returns the start epoch timestamp in nanos of this {@code Span}. * Returns the start epoch timestamp in nanos of this {@code Span}.
* *
* @return the start epoch timestamp in nanos of this {@code Span}. * @return the start epoch timestamp in nanos of this {@code Span}.
* @since 0.1.0
*/ */
long getStartEpochNanos(); long getStartEpochNanos();
@ -114,7 +107,6 @@ public interface SpanData {
* Returns the attributes recorded for this {@code Span}. * Returns the attributes recorded for this {@code Span}.
* *
* @return the attributes recorded for this {@code Span}. * @return the attributes recorded for this {@code Span}.
* @since 0.1.0
*/ */
ReadableAttributes getAttributes(); ReadableAttributes getAttributes();
@ -122,7 +114,6 @@ public interface SpanData {
* Returns the timed events recorded for this {@code Span}. * Returns the timed events recorded for this {@code Span}.
* *
* @return the timed events recorded for this {@code Span}. * @return the timed events recorded for this {@code Span}.
* @since 0.1.0
*/ */
List<Event> getEvents(); List<Event> getEvents();
@ -130,7 +121,6 @@ public interface SpanData {
* Returns links recorded for this {@code Span}. * Returns links recorded for this {@code Span}.
* *
* @return links recorded for this {@code Span}. * @return links recorded for this {@code Span}.
* @since 0.1.0
*/ */
List<Link> getLinks(); List<Link> getLinks();
@ -138,7 +128,6 @@ public interface SpanData {
* Returns the {@code Status}. * Returns the {@code Status}.
* *
* @return the {@code Status}. * @return the {@code Status}.
* @since 0.1.0
*/ */
Status getStatus(); Status getStatus();
@ -146,7 +135,6 @@ public interface SpanData {
* Returns the end epoch timestamp in nanos of this {@code Span}. * Returns the end epoch timestamp in nanos of this {@code Span}.
* *
* @return the end epoch timestamp in nanos of this {@code Span}. * @return the end epoch timestamp in nanos of this {@code Span}.
* @since 0.1.0
*/ */
long getEndEpochNanos(); long getEndEpochNanos();
@ -156,7 +144,6 @@ public interface SpanData {
* *
* @return {@code true} if the parent is on a different process. {@code false} if this is a root * @return {@code true} if the parent is on a different process. {@code false} if this is a root
* span. * span.
* @since 0.3.0
*/ */
boolean getHasRemoteParent(); boolean getHasRemoteParent();
@ -164,7 +151,6 @@ public interface SpanData {
* Returns whether this Span has already been ended. * Returns whether this Span has already been ended.
* *
* @return {@code true} if the span has already been ended, {@code false} if not. * @return {@code true} if the span has already been ended, {@code false} if not.
* @since 0.4.0
*/ */
boolean getHasEnded(); boolean getHasEnded();
@ -195,11 +181,7 @@ public interface SpanData {
*/ */
int getTotalAttributeCount(); int getTotalAttributeCount();
/** /** An immutable implementation of {@link io.opentelemetry.trace.Link}. */
* An immutable implementation of {@link io.opentelemetry.trace.Link}.
*
* @since 0.1.0
*/
@Immutable @Immutable
@AutoValue @AutoValue
abstract class Link implements io.opentelemetry.trace.Link { abstract class Link implements io.opentelemetry.trace.Link {
@ -212,7 +194,6 @@ public interface SpanData {
* *
* @param spanContext the {@code SpanContext} of this {@code Link}. * @param spanContext the {@code SpanContext} of this {@code Link}.
* @return a new immutable {@code Event<T>} * @return a new immutable {@code Event<T>}
* @since 0.1.0
*/ */
public static Link create(SpanContext spanContext) { public static Link create(SpanContext spanContext) {
return new AutoValue_SpanData_Link( return new AutoValue_SpanData_Link(
@ -225,7 +206,6 @@ public interface SpanData {
* @param spanContext the {@code SpanContext} of this {@code Link}. * @param spanContext the {@code SpanContext} of this {@code Link}.
* @param attributes the attributes of this {@code Link}. * @param attributes the attributes of this {@code Link}.
* @return a new immutable {@code Event<T>} * @return a new immutable {@code Event<T>}
* @since 0.1.0
*/ */
public static Link create(SpanContext spanContext, Attributes attributes) { public static Link create(SpanContext spanContext, Attributes attributes) {
return new AutoValue_SpanData_Link(spanContext, attributes, attributes.size()); return new AutoValue_SpanData_Link(spanContext, attributes, attributes.size());
@ -238,7 +218,6 @@ public interface SpanData {
* @param attributes the attributes of this {@code Link}. * @param attributes the attributes of this {@code Link}.
* @param totalAttributeCount the total number of attributed for this {@code Link}. * @param totalAttributeCount the total number of attributed for this {@code Link}.
* @return a new immutable {@code Event<T>} * @return a new immutable {@code Event<T>}
* @since 0.1.0
*/ */
public static Link create( public static Link create(
SpanContext spanContext, Attributes attributes, int totalAttributeCount) { SpanContext spanContext, Attributes attributes, int totalAttributeCount) {
@ -263,7 +242,6 @@ public interface SpanData {
* Returns the epoch time in nanos of this event. * Returns the epoch time in nanos of this event.
* *
* @return the epoch time in nanos of this event. * @return the epoch time in nanos of this event.
* @since 0.1.0
*/ */
long getEpochNanos(); long getEpochNanos();

View File

@ -22,6 +22,7 @@ import io.opentelemetry.trace.spi.TracerProviderFactory;
/** SDK implementation of the TracerProviderFactory for SPI. */ /** SDK implementation of the TracerProviderFactory for SPI. */
public final class TracerProviderFactorySdk implements TracerProviderFactory { public final class TracerProviderFactorySdk implements TracerProviderFactory {
@Override @Override
public TracerProvider create() { public TracerProvider create() {
return TracerSdkProvider.builder().build(); return TracerSdkProvider.builder().build();