diff options
| author | Kristen Kozak <sebright@google.com> | 2018-02-07 19:34:48 -0800 |
|---|---|---|
| committer | Kristen Kozak <sebright@google.com> | 2018-02-07 19:34:48 -0800 |
| commit | d6a2027abfa344a75ecacdc8ca4e4c9d13d1c461 (patch) | |
| tree | 59653558931fba7a2e6a60fb8cd1c46833392d2d /exporters | |
| parent | 1d2c51b7d4d5475508622f0b3840bae3dab586de (diff) | |
| download | platform_external_opencensus-java-d6a2027abfa344a75ecacdc8ca4e4c9d13d1c461.tar.gz platform_external_opencensus-java-d6a2027abfa344a75ecacdc8ca4e4c9d13d1c461.tar.bz2 platform_external_opencensus-java-d6a2027abfa344a75ecacdc8ca4e4c9d13d1c461.zip | |
Add '@since' Javadoc tag to all exporter APIs (issue #864).
Diffstat (limited to 'exporters')
10 files changed, 101 insertions, 10 deletions
diff --git a/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsConfiguration.java b/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsConfiguration.java index db237b8a..7510fd1d 100644 --- a/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsConfiguration.java +++ b/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsConfiguration.java @@ -24,7 +24,11 @@ import java.net.URI; import java.net.URISyntaxException; import javax.annotation.concurrent.Immutable; -/** Configurations for {@link SignalFxStatsExporter}. */ +/** + * Configurations for {@link SignalFxStatsExporter}. + * + * @since 0.11 + */ @AutoValue @Immutable // Suppress Checker Framework warning about missing @Nullable in generated equals method. @@ -32,7 +36,11 @@ import javax.annotation.concurrent.Immutable; @SuppressWarnings("nullness") public abstract class SignalFxStatsConfiguration { - /** The default SignalFx ingest API URL. */ + /** + * The default SignalFx ingest API URL. + * + * @since 0.11 + */ public static final URI DEFAULT_SIGNALFX_ENDPOINT; static { @@ -44,7 +52,11 @@ public abstract class SignalFxStatsConfiguration { } } - /** The default stats export interval. */ + /** + * The default stats export interval. + * + * @since 0.11 + */ public static final Duration DEFAULT_EXPORT_INTERVAL = Duration.create(1, 0); private static final Duration ZERO = Duration.create(0, 0); @@ -55,6 +67,7 @@ public abstract class SignalFxStatsConfiguration { * Returns the SignalFx ingest API URL. * * @return the SignalFx ingest API URL. + * @since 0.11 */ public abstract URI getIngestEndpoint(); @@ -62,6 +75,7 @@ public abstract class SignalFxStatsConfiguration { * Returns the authentication token. * * @return the authentication token. + * @since 0.11 */ public abstract String getToken(); @@ -69,6 +83,7 @@ public abstract class SignalFxStatsConfiguration { * Returns the export interval between pushes to SignalFx. * * @return the export interval. + * @since 0.11 */ public abstract Duration getExportInterval(); @@ -76,6 +91,7 @@ public abstract class SignalFxStatsConfiguration { * Returns a new {@link Builder}. * * @return a {@code Builder}. + * @since 0.11 */ public static Builder builder() { return new AutoValue_SignalFxStatsConfiguration.Builder() @@ -83,7 +99,11 @@ public abstract class SignalFxStatsConfiguration { .setExportInterval(DEFAULT_EXPORT_INTERVAL); } - /** Builder for {@link SignalFxStatsConfiguration}. */ + /** + * Builder for {@link SignalFxStatsConfiguration}. + * + * @since 0.11 + */ @AutoValue.Builder public abstract static class Builder { @@ -94,6 +114,7 @@ public abstract class SignalFxStatsConfiguration { * * @param url the SignalFx ingest API URL. * @return this. + * @since 0.11 */ public abstract Builder setIngestEndpoint(URI url); @@ -102,6 +123,7 @@ public abstract class SignalFxStatsConfiguration { * * @param token the authentication token. * @return this. + * @since 0.11 */ public abstract Builder setToken(String token); @@ -110,6 +132,7 @@ public abstract class SignalFxStatsConfiguration { * * @param exportInterval the export interval between pushes to SignalFx. * @return this. + * @since 0.11 */ public abstract Builder setExportInterval(Duration exportInterval); @@ -119,6 +142,7 @@ public abstract class SignalFxStatsConfiguration { * Builds a new {@link SignalFxStatsConfiguration} with current settings. * * @return a {@code SignalFxStatsConfiguration}. + * @since 0.11 */ public SignalFxStatsConfiguration build() { SignalFxStatsConfiguration config = autoBuild(); diff --git a/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsExporter.java b/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsExporter.java index 894839b5..f7915b71 100644 --- a/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsExporter.java +++ b/exporters/stats/signalfx/src/main/java/io/opencensus/exporter/stats/signalfx/SignalFxStatsExporter.java @@ -34,6 +34,8 @@ import javax.annotation.concurrent.GuardedBy; * ... // Do work. * } * </code></pre> + * + * @since 0.11 */ public final class SignalFxStatsExporter { @@ -69,6 +71,7 @@ public final class SignalFxStatsExporter { * * @param configuration the {@code SignalFxStatsConfiguration}. * @throws IllegalStateException if a SignalFx exporter is already created. + * @since 0.11 */ public static void create(SignalFxStatsConfiguration configuration) { synchronized (monitor) { diff --git a/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsConfiguration.java b/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsConfiguration.java index 1b6ea1db..98876528 100644 --- a/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsConfiguration.java +++ b/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsConfiguration.java @@ -23,7 +23,11 @@ import io.opencensus.common.Duration; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; -/** Configurations for {@link StackdriverStatsExporter}. */ +/** + * Configurations for {@link StackdriverStatsExporter}. + * + * @since 0.11 + */ @AutoValue @Immutable // Suppress Checker Framework warning about missing @Nullable in generated equals method. @@ -37,6 +41,7 @@ public abstract class StackdriverStatsConfiguration { * Returns the {@link Credentials}. * * @return the {@code Credentials}. + * @since 0.11 */ @Nullable public abstract Credentials getCredentials(); @@ -45,6 +50,7 @@ public abstract class StackdriverStatsConfiguration { * Returns the project id. * * @return the project id. + * @since 0.11 */ @Nullable public abstract String getProjectId(); @@ -53,6 +59,7 @@ public abstract class StackdriverStatsConfiguration { * Returns the export interval between pushes to StackDriver. * * @return the export interval. + * @since 0.11 */ @Nullable public abstract Duration getExportInterval(); @@ -61,6 +68,7 @@ public abstract class StackdriverStatsConfiguration { * Returns the Stackdriver {@link MonitoredResource}. * * @return the {@code MonitoredResource}. + * @since 0.11 */ @Nullable public abstract MonitoredResource getMonitoredResource(); @@ -69,12 +77,17 @@ public abstract class StackdriverStatsConfiguration { * Returns a new {@link Builder}. * * @return a {@code Builder}. + * @since 0.11 */ public static Builder builder() { return new AutoValue_StackdriverStatsConfiguration.Builder(); } - /** Builder for {@link StackdriverStatsConfiguration}. */ + /** + * Builder for {@link StackdriverStatsConfiguration}. + * + * @since 0.11 + */ @AutoValue.Builder public abstract static class Builder { @@ -85,6 +98,7 @@ public abstract class StackdriverStatsConfiguration { * * @param credentials the {@code Credentials}. * @return this. + * @since 0.11 */ public abstract Builder setCredentials(Credentials credentials); @@ -93,6 +107,7 @@ public abstract class StackdriverStatsConfiguration { * * @param projectId the cloud project id. * @return this. + * @since 0.11 */ public abstract Builder setProjectId(String projectId); @@ -101,6 +116,7 @@ public abstract class StackdriverStatsConfiguration { * * @param exportInterval the export interval between pushes to StackDriver. * @return this. + * @since 0.11 */ public abstract Builder setExportInterval(Duration exportInterval); @@ -109,6 +125,7 @@ public abstract class StackdriverStatsConfiguration { * * @param monitoredResource the Stackdriver {@code MonitoredResource}. * @return this. + * @since 0.11 */ public abstract Builder setMonitoredResource(MonitoredResource monitoredResource); @@ -116,6 +133,7 @@ public abstract class StackdriverStatsConfiguration { * Builds a new {@link StackdriverStatsConfiguration} with current settings. * * @return a {@code StackdriverStatsConfiguration}. + * @since 0.11 */ public abstract StackdriverStatsConfiguration build(); } diff --git a/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsExporter.java b/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsExporter.java index c2277fba..c060373d 100644 --- a/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsExporter.java +++ b/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsExporter.java @@ -53,6 +53,8 @@ import javax.annotation.concurrent.GuardedBy; * ... // Do work. * } * </code></pre> + * + * @since 0.9 */ public final class StackdriverStatsExporter { @@ -97,6 +99,7 @@ public final class StackdriverStatsExporter { * @param exportInterval the interval between pushing stats to StackDriver. * @throws IllegalStateException if a Stackdriver exporter already exists. * @deprecated in favor of {@link #createAndRegister(StackdriverStatsConfiguration)}. + * @since 0.9 */ @Deprecated public static void createAndRegisterWithCredentialsAndProjectId( @@ -127,6 +130,7 @@ public final class StackdriverStatsExporter { * @param exportInterval the interval between pushing stats to StackDriver. * @throws IllegalStateException if a Stackdriver exporter is already created. * @deprecated in favor of {@link #createAndRegister(StackdriverStatsConfiguration)}. + * @since 0.9 */ @Deprecated public static void createAndRegisterWithProjectId(String projectId, Duration exportInterval) @@ -216,6 +220,7 @@ public final class StackdriverStatsExporter { * @param exportInterval the interval between pushing stats to StackDriver. * @throws IllegalStateException if a Stackdriver exporter is already created. * @deprecated in favor of {@link #createAndRegister(StackdriverStatsConfiguration)}. + * @since 0.9 */ @Deprecated public static void createAndRegister(Duration exportInterval) throws IOException { @@ -240,6 +245,7 @@ public final class StackdriverStatsExporter { * @param monitoredResource the Monitored Resource used by exporter. * @throws IllegalStateException if a Stackdriver exporter is already created. * @deprecated in favor of {@link #createAndRegister(StackdriverStatsConfiguration)}. + * @since 0.10 */ @Deprecated public static void createAndRegisterWithProjectIdAndMonitoredResource( @@ -268,6 +274,7 @@ public final class StackdriverStatsExporter { * @param monitoredResource the Monitored Resource used by exporter. * @throws IllegalStateException if a Stackdriver exporter is already created. * @deprecated in favor of {@link #createAndRegister(StackdriverStatsConfiguration)}. + * @since 0.10 */ @Deprecated public static void createAndRegisterWithMonitoredResource( diff --git a/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingExporter.java b/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingExporter.java index da8f5785..46f01ffc 100644 --- a/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingExporter.java +++ b/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingExporter.java @@ -33,13 +33,18 @@ import javax.annotation.concurrent.ThreadSafe; * }</pre> * * @deprecated Deprecated due to inconsistent naming. Use {@link LoggingTraceExporter}. + * @since 0.6 */ @ThreadSafe @Deprecated public final class LoggingExporter { private LoggingExporter() {} - /** Registers the Logging exporter to the OpenCensus library. */ + /** + * Registers the Logging exporter to the OpenCensus library. + * + * @since 0.6 + */ public static void register() { LoggingTraceExporter.register(); } @@ -54,7 +59,11 @@ public final class LoggingExporter { LoggingTraceExporter.register(spanExporter); } - /** Unregisters the Logging exporter from the OpenCensus library. */ + /** + * Unregisters the Logging exporter from the OpenCensus library. + * + * @since 0.6 + */ public static void unregister() { LoggingTraceExporter.unregister(); } diff --git a/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingTraceExporter.java b/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingTraceExporter.java index 65e40911..9267e201 100644 --- a/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingTraceExporter.java +++ b/exporters/trace/logging/src/main/java/io/opencensus/exporter/trace/logging/LoggingTraceExporter.java @@ -37,6 +37,8 @@ import javax.annotation.concurrent.ThreadSafe; * ... // Do work. * } * }</pre> + * + * @since 0.12 */ @ThreadSafe public final class LoggingTraceExporter { @@ -46,7 +48,11 @@ public final class LoggingTraceExporter { private LoggingTraceExporter() {} - /** Registers the Logging exporter to the OpenCensus library. */ + /** + * Registers the Logging exporter to the OpenCensus library. + * + * @since 0.12 + */ public static void register() { register(Tracing.getExportComponent().getSpanExporter()); } @@ -61,7 +67,11 @@ public final class LoggingTraceExporter { spanExporter.registerHandler(REGISTER_NAME, HANDLER); } - /** Unregisters the Logging exporter from the OpenCensus library. */ + /** + * Unregisters the Logging exporter from the OpenCensus library. + * + * @since 0.12 + */ public static void unregister() { unregister(Tracing.getExportComponent().getSpanExporter()); } diff --git a/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java b/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java index 2a77541f..fb09d76a 100644 --- a/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java +++ b/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverExporter.java @@ -37,6 +37,7 @@ import java.io.IOException; * }</pre> * * @deprecated Deprecated due to inconsistent naming. Use {@link StackdriverTraceExporter}. + * @since 0.6 */ @Deprecated public final class StackdriverExporter { @@ -49,6 +50,7 @@ public final class StackdriverExporter { * @param credentials a credentials used to authenticate API calls. * @param projectId the cloud project id. * @throws IllegalStateException if a Stackdriver exporter is already registered. + * @since 0.6 */ public static void createAndRegisterWithCredentialsAndProjectId( Credentials credentials, String projectId) throws IOException { @@ -71,6 +73,7 @@ public final class StackdriverExporter { * * @param projectId the cloud project id. * @throws IllegalStateException if a Stackdriver exporter is already registered. + * @since 0.6 */ public static void createAndRegisterWithProjectId(String projectId) throws IOException { StackdriverTraceExporter.createAndRegisterWithProjectId(projectId); @@ -92,6 +95,7 @@ public final class StackdriverExporter { * }</pre> * * @throws IllegalStateException if a Stackdriver exporter is already registered. + * @since 0.6 */ public static void createAndRegister() throws IOException { StackdriverTraceExporter.createAndRegister(); @@ -111,6 +115,7 @@ public final class StackdriverExporter { * Unregisters the Stackdriver Trace exporter from the OpenCensus library. * * @throws IllegalStateException if a Stackdriver exporter is not registered. + * @since 0.6 */ public static void unregister() { StackdriverTraceExporter.unregister(); diff --git a/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverTraceExporter.java b/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverTraceExporter.java index faad5097..303adee8 100644 --- a/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverTraceExporter.java +++ b/exporters/trace/stackdriver/src/main/java/io/opencensus/exporter/trace/stackdriver/StackdriverTraceExporter.java @@ -40,6 +40,8 @@ import javax.annotation.concurrent.GuardedBy; * ... // Do work. * } * }</pre> + * + * @since 0.12 */ public final class StackdriverTraceExporter { @@ -58,6 +60,7 @@ public final class StackdriverTraceExporter { * @param credentials a credentials used to authenticate API calls. * @param projectId the cloud project id. * @throws IllegalStateException if a Stackdriver exporter is already registered. + * @since 0.12 */ public static void createAndRegisterWithCredentialsAndProjectId( Credentials credentials, String projectId) throws IOException { @@ -83,6 +86,7 @@ public final class StackdriverTraceExporter { * * @param projectId the cloud project id. * @throws IllegalStateException if a Stackdriver exporter is already registered. + * @since 0.12 */ public static void createAndRegisterWithProjectId(String projectId) throws IOException { synchronized (monitor) { @@ -107,6 +111,7 @@ public final class StackdriverTraceExporter { * }</pre> * * @throws IllegalStateException if a Stackdriver exporter is already registered. + * @since 0.12 */ public static void createAndRegister() throws IOException { synchronized (monitor) { @@ -136,6 +141,7 @@ public final class StackdriverTraceExporter { * Unregisters the Stackdriver Trace exporter from the OpenCensus library. * * @throws IllegalStateException if a Stackdriver exporter is not registered. + * @since 0.12 */ public static void unregister() { synchronized (monitor) { diff --git a/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinExporter.java b/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinExporter.java index 389e57a6..e20360e8 100644 --- a/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinExporter.java +++ b/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinExporter.java @@ -36,6 +36,7 @@ import zipkin2.reporter.Sender; * }</pre> * * @deprecated Deprecated due to inconsistent naming. Use {@link ZipkinTraceExporter}. + * @since 0.8 */ @Deprecated public final class ZipkinExporter { @@ -49,6 +50,7 @@ public final class ZipkinExporter { * @param v2Url Ex http://127.0.0.1:9411/api/v2/spans * @param serviceName the {@link Span#localServiceName() local service name} of the process. * @throws IllegalStateException if a Zipkin exporter is already registered. + * @since 0.8 */ public static void createAndRegister(String v2Url, String serviceName) { ZipkinTraceExporter.createAndRegister(v2Url, serviceName); @@ -62,6 +64,7 @@ public final class ZipkinExporter { * @param sender Often, but not necessarily an http sender. This could be Kafka or SQS. * @param serviceName the {@link Span#localServiceName() local service name} of the process. * @throws IllegalStateException if a Zipkin exporter is already registered. + * @since 0.8 */ public static void createAndRegister( SpanBytesEncoder encoder, Sender sender, String serviceName) { @@ -82,6 +85,7 @@ public final class ZipkinExporter { * Unregisters the Zipkin Trace exporter from the OpenCensus library. * * @throws IllegalStateException if a Zipkin exporter is not registered. + * @since 0.8 */ public static void unregister() { ZipkinTraceExporter.unregister(); diff --git a/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinTraceExporter.java b/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinTraceExporter.java index 51365452..aad5a563 100644 --- a/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinTraceExporter.java +++ b/exporters/trace/zipkin/src/main/java/io/opencensus/exporter/trace/zipkin/ZipkinTraceExporter.java @@ -40,6 +40,8 @@ import zipkin2.reporter.urlconnection.URLConnectionSender; * ... // Do work. * } * }</pre> + * + * @since 0.12 */ public final class ZipkinTraceExporter { @@ -59,6 +61,7 @@ public final class ZipkinTraceExporter { * @param v2Url Ex http://127.0.0.1:9411/api/v2/spans * @param serviceName the {@link Span#localServiceName() local service name} of the process. * @throws IllegalStateException if a Zipkin exporter is already registered. + * @since 0.12 */ public static void createAndRegister(String v2Url, String serviceName) { createAndRegister(SpanBytesEncoder.JSON_V2, URLConnectionSender.create(v2Url), serviceName); @@ -72,6 +75,7 @@ public final class ZipkinTraceExporter { * @param sender Often, but not necessarily an http sender. This could be Kafka or SQS. * @param serviceName the {@link Span#localServiceName() local service name} of the process. * @throws IllegalStateException if a Zipkin exporter is already registered. + * @since 0.12 */ public static void createAndRegister( SpanBytesEncoder encoder, Sender sender, String serviceName) { @@ -97,6 +101,7 @@ public final class ZipkinTraceExporter { * Unregisters the Zipkin Trace exporter from the OpenCensus library. * * @throws IllegalStateException if a Zipkin exporter is not registered. + * @since 0.12 */ public static void unregister() { synchronized (monitor) { |
