Update javadoc (#1238)

* Update javadoc

* typos

* Formatting

* Update links in javadoc

* Polish documentation
This commit is contained in:
Giovanni Liva 2020-05-20 16:14:11 +02:00 committed by GitHub
parent 33b33c17f9
commit 590be57734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 133 additions and 154 deletions

View File

@ -30,7 +30,27 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;
/** Exports metrics using OTLP via gRPC, using OpenTelemetry's protobuf model. */
/**
* Exports metrics using OTLP via gRPC, using OpenTelemetry's protobuf model.
*
* <p>Configuration options for {@link OtlpGrpcMetricExporter} can be read from system properties,
* environment variables, or {@link java.util.Properties} objects.
*
* <p>For system properties and {@link java.util.Properties} objects, {@link OtlpGrpcMetricExporter}
* will look for the following names:
*
* <ul>
* <li>{@code otel.otlp.metric.timeout}: to set the max waiting time allowed to send each metric
* batch.
* </ul>
*
* <p>For environment variables, {@link OtlpGrpcMetricExporter} will look for the following names:
*
* <ul>
* <li>{@code OTEL_OTLP_METRIC_TIMEOUT}: to set the max waiting time allowed to send each metric
* batch.
* </ul>
*/
@ThreadSafe
public final class OtlpGrpcMetricExporter implements MetricExporter {
private static final Logger logger = Logger.getLogger(OtlpGrpcMetricExporter.class.getName());
@ -166,12 +186,6 @@ public final class OtlpGrpcMetricExporter implements MetricExporter {
/**
* Sets the configuration values from the given configuration map for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.otlp.metric.timeout}: to set the max waiting time for the collector to
* process each metric batch.
* </ul>
*
* @param configMap {@link Map} holding the configuration values.
* @return this.
@ -189,12 +203,6 @@ public final class OtlpGrpcMetricExporter implements MetricExporter {
/**
* Sets the configuration values from the given properties object for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.otlp.metric.timeout}: to set the max waiting time for the collector to
* process each metric batch.
* </ul>
*
* @param properties {@link Properties} holding the configuration values.
* @return this.
@ -205,13 +213,7 @@ public final class OtlpGrpcMetricExporter implements MetricExporter {
}
/**
* Sets the configuration values from environment variables for only the available keys. This
* method looks for the following keys:
*
* <ul>
* <li>{@code OTEL_OTLP_METRIC_TIMEOUT}: to set the max waiting time for the collector to
* process each metric batch.
* </ul>
* Sets the configuration values from environment variables for only the available keys.
*
* @return this.
*/
@ -221,13 +223,7 @@ public final class OtlpGrpcMetricExporter implements MetricExporter {
}
/**
* Sets the configuration values from system properties for only the available keys. This method
* looks for the following keys:
*
* <ul>
* <li>{@code otel.otlp.metric.timeout}: to set the max waiting time for the collector to
* process each metric batch.
* </ul>
* Sets the configuration values from system properties for only the available keys.
*
* @return this.
*/

View File

@ -30,7 +30,27 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;
/** Exports spans using OTLP via gRPC, using OpenTelemetry's protobuf model. */
/**
* Exports spans using OTLP via gRPC, using OpenTelemetry's protobuf model.
*
* <p>Configuration options for {@link OtlpGrpcSpanExporter} can be read from system properties,
* environment variables, or {@link java.util.Properties} objects.
*
* <p>For system properties and {@link java.util.Properties} objects, {@link OtlpGrpcSpanExporter}
* will look for the following names:
*
* <ul>
* <li>{@code otel.otlp.span.timeout}: to set the max waiting time allowed to send each span
* batch.
* </ul>
*
* <p>For environment variables, {@link OtlpGrpcSpanExporter} will look for the following names:
*
* <ul>
* <li>{@code OTEL_OTLP_SPAN_TIMEOUT}: to set the max waiting time allowed to send each span
* batch.
* </ul>
*/
@ThreadSafe
public final class OtlpGrpcSpanExporter implements SpanExporter {
private static final Logger logger = Logger.getLogger(OtlpGrpcSpanExporter.class.getName());
@ -165,12 +185,6 @@ public final class OtlpGrpcSpanExporter implements SpanExporter {
/**
* Sets the configuration values from the given configuration map for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.otlp.span.timeout}: to set the max waiting time for the collector to
* process each span batch.
* </ul>
*
* @param configMap {@link Map} holding the configuration values.
* @return this.
@ -188,12 +202,6 @@ public final class OtlpGrpcSpanExporter implements SpanExporter {
/**
* Sets the configuration values from the given properties object for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.otlp.span.timeout}: to set the max waiting time for the collector to
* process each span batch.
* </ul>
*
* @param properties {@link Properties} holding the configuration values.
* @return this.
@ -204,13 +212,7 @@ public final class OtlpGrpcSpanExporter implements SpanExporter {
}
/**
* Sets the configuration values from environment variables for only the available keys. This
* method looks for the following keys:
*
* <ul>
* <li>{@code OTEL_OTLP_SPAN_TIMEOUT}: to set the max waiting time for the collector to
* process each span batch.
* </ul>
* Sets the configuration values from environment variables for only the available keys.
*
* @return this.
*/
@ -220,13 +222,7 @@ public final class OtlpGrpcSpanExporter implements SpanExporter {
}
/**
* Sets the configuration values from system properties for only the available keys. This method
* looks for the following keys:
*
* <ul>
* <li>{@code otel.otlp.span.timeout}: to set the max waiting time for the collector to
* process each span batch.
* </ul>
* Sets the configuration values from system properties for only the available keys.
*
* @return this.
*/

View File

@ -28,44 +28,44 @@
* <li>{@link io.opentelemetry.exporters.otlp.SpanAdapter}
* </ul>
*
* <p>Values for {@link io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter} and {@link
* io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter} can be read from system properties,
* <p>Configuration options for {@link io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter} and
* {@link io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter} can be read from system properties,
* environment variables, or {@link java.util.Properties} objects.
*
* <h2>{@link io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter}</h2>
*
* <p>For System Properties and {@link java.util.Properties} objects, {@link
* <p>For system properties and {@link java.util.Properties} objects, {@link
* io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter} will look for the following names:
*
* <ul>
* <li>{@code otel.otlp.metric.timeout}: to set the max waiting time for the collector to process
* each metric batch.
* <li>{@code otel.otlp.metric.timeout}: to set the max waiting time allowed to send each metric
* batch.
* </ul>
*
* <p>For Environment Variable, {@link io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter} will
* <p>For environment variables, {@link io.opentelemetry.exporters.otlp.OtlpGrpcMetricExporter} will
* look for the following names:
*
* <ul>
* <li>{@code OTEL_OTLP_METRIC_TIMEOUT}: to set the max waiting time for the collector to process
* each metric batch.
* <li>{@code OTEL_OTLP_METRIC_TIMEOUT}: to set the max waiting time allowed to send each metric
* batch.
* </ul>
*
* <h2>{@link io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter}</h2>
*
* <p>For System Properties and {@link java.util.Properties} objects, {@link
* <p>For system properties and {@link java.util.Properties} objects, {@link
* io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter} will look for the following names:
*
* <ul>
* <li>{@code otel.otlp.span.timeout}: to set the max waiting time for the collector to process
* each span batch.
* <li>{@code otel.otlp.span.timeout}: to set the max waiting time allowed to send each span
* batch.
* </ul>
*
* <p>For Environment Variable, {@link io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter} will
* <p>For environment variables, {@link io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter} will
* look for the following names:
*
* <ul>
* <li>{@code OTEL_OTLP_SPAN_TIMEOUT}: to set the max waiting time for the collector to process
* each span batch.
* <li>{@code OTEL_OTLP_SPAN_TIMEOUT}: to set the max waiting time allowed to send each span
* batch.
* </ul>
*/
package io.opentelemetry.exporters.otlp;

View File

@ -36,6 +36,22 @@ import javax.annotation.concurrent.Immutable;
* Wraps a list of {@link MetricProducer}s and automatically reads and exports the metrics every
* export interval.
*
* <p>Configuration options for {@link IntervalMetricReader} can be read from system properties,
* environment variables, or {@link java.util.Properties} objects.
*
* <p>For system properties and {@link java.util.Properties} objects, {@link IntervalMetricReader}
* will look for the following names:
*
* <ul>
* <li>{@code otel.imr.export.interval}: sets the export interval between pushes to the exporter.
* </ul>
*
* <p>For environment variables, {@link IntervalMetricReader} will look for the following names:
*
* <ul>
* <li>{@code OTEL_IMR_EXPORT_INTERVAL}: sets the export interval between pushes to the exporter.
* </ul>
*
* @since 0.3.0
*/
public final class IntervalMetricReader {
@ -149,12 +165,6 @@ public final class IntervalMetricReader {
/**
* Sets the configuration values from the given configuration map for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.imr.export.interval}: to set the export interval between pushes to the
* exporter.
* </ul>
*
* @param configMap {@link Map} holding the configuration values.
* @return this.
@ -172,12 +182,6 @@ public final class IntervalMetricReader {
/**
* Sets the configuration values from the given properties object for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.imr.export.interval}: to set the export interval between pushes to the
* exporter.
* </ul>
*
* @param properties {@link Properties} holding the configuration values.
* @return this.
@ -188,13 +192,7 @@ public final class IntervalMetricReader {
}
/**
* Sets the configuration values from environment variables for only the available keys. This
* method looks for the following keys:
*
* <ul>
* <li>{@code OTEL_IMR_EXPORT_INTERVAL}: to set the export interval between pushes to the
* exporter.
* </ul>
* Sets the configuration values from environment variables for only the available keys.
*
* @return this.
*/
@ -204,13 +202,7 @@ public final class IntervalMetricReader {
}
/**
* Sets the configuration values from system properties for only the available keys. This method
* looks for the following keys:
*
* <ul>
* <li>{@code otel.imr.export.interval}: to set the export interval between pushes to the
* exporter.
* </ul>
* Sets the configuration values from system properties for only the available keys.
*
* @return this.
*/

View File

@ -25,17 +25,17 @@
* <li>{@link io.opentelemetry.sdk.metrics.export.MetricProducer}
* </ul>
*
* <p>Values for {@link io.opentelemetry.sdk.metrics.export.IntervalMetricReader} can be read from
* system properties, environment variables, or {@link java.util.Properties} objects.
* <p>Configuration options for {@link io.opentelemetry.sdk.metrics.export.IntervalMetricReader} can
* be read from system properties, environment variables, or {@link java.util.Properties} objects.
*
* <p>For System Properties and {@link java.util.Properties} objects, {@link
* <p>For system properties and {@link java.util.Properties} objects, {@link
* io.opentelemetry.sdk.metrics.export.IntervalMetricReader} will look for the following names:
*
* <ul>
* <li>{@code otel.imr.export.interval}: sets the export interval between pushes to the exporter.
* </ul>
*
* <p>For Environment Variable, {@link io.opentelemetry.sdk.metrics.export.IntervalMetricReader}
* <p>For environment variables, {@link io.opentelemetry.sdk.metrics.export.IntervalMetricReader}
* will look for the following names:
*
* <ul>

View File

@ -56,6 +56,30 @@ import javax.annotation.concurrent.GuardedBy;
*
* <p>This batch {@link SpanProcessor} can cause high contention in a very high traffic service.
* TODO: Add a link to the SpanProcessor that uses Disruptor as alternative with low contention.
*
* <p>Configuration options for {@link BatchSpanProcessor} can be read from system properties,
* environment variables, or {@link java.util.Properties} objects.
*
* <p>For system properties and {@link java.util.Properties} objects, {@link BatchSpanProcessor}
* will look for the following names:
*
* <ul>
* <li>{@code otel.bsp.schedule.delay}: sets the delay interval between two consecutive exports.
* <li>{@code otel.bsp.max.queue}: sets the maximum queue size.
* <li>{@code otel.bsp.max.export.batch}: sets the maximum batch size.
* <li>{@code otel.bsp.export.timeout}: sets the maximum allowed time to export data.
* <li>{@code otel.bsp.export.sampled}: sets whether only sampled spans should be exported.
* </ul>
*
* <p>For environment variables, {@link BatchSpanProcessor} will look for the following names:
*
* <ul>
* <li>{@code OTEL_BSP_SCHEDULE_DELAY}: sets the delay interval between two consecutive exports.
* <li>{@code OTEL_BSP_MAX_QUEUE}: sets the maximum queue size.
* <li>{@code OTEL_BSP_MAX_EXPORT_BATCH}: sets the maximum batch size.
* <li>{@code OTEL_BSP_EXPORT_TIMEOUT}: sets the maximum allowed time to export data.
* <li>{@code OTEL_BSP_EXPORT_SAMPLED}: sets whether only sampled spans should be exported.
* </ul>
*/
public final class BatchSpanProcessor implements SpanProcessor {
@ -317,16 +341,6 @@ public final class BatchSpanProcessor implements SpanProcessor {
/**
* Sets the configuration values from the given configuration map for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.bsp.schedule.delay}: to set the delay interval between two consecutive
* exports.
* <li>{@code otel.bsp.max.queue}: to set the maximum queue size.
* <li>{@code otel.bsp.max.export.batch}: to set the maximum batch size.
* <li>{@code otel.bsp.export.timeout}: to set the maximum allowed time to export data.
* <li>{@code otel.bsp.export.sampled}: to set whether only sampled spans should be exported.
* </ul>
*
* @param configMap {@link Map} holding the configuration values.
* @return this.
@ -361,16 +375,6 @@ public final class BatchSpanProcessor implements SpanProcessor {
/**
* Sets the configuration values from the given properties object for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.bsp.schedule.delay}: to set the delay interval between two consecutive
* exports.
* <li>{@code otel.bsp.max.queue}: to set the maximum queue size.
* <li>{@code otel.bsp.max.export.batch}: to set the maximum batch size.
* <li>{@code otel.bsp.export.timeout}: to set the maximum allowed time to export data.
* <li>{@code otel.bsp.export.sampled}: to set whether only sampled spans should be exported.
* </ul>
*
* @param properties {@link Properties} holding the configuration values.
* @return this.
@ -401,17 +405,7 @@ public final class BatchSpanProcessor implements SpanProcessor {
}
/**
* Sets the configuration values from system properties for only the available keys. This method
* looks for the following keys:
*
* <ul>
* <li>{@code otel.bsp.schedule.delay}: to set the delay interval between two consecutive
* exports.
* <li>{@code otel.bsp.max.queue}: to set the maximum queue size.
* <li>{@code otel.bsp.max.export.batch}: to set the maximum batch size.
* <li>{@code otel.bsp.export.timeout}: to set the maximum allowed time to export data.
* <li>{@code otel.bsp.export.sampled}: to set whether only sampled spans should be reported.
* </ul>
* Sets the configuration values from system properties for only the available keys.
*
* @return this.
*/

View File

@ -32,6 +32,22 @@ import java.util.logging.Logger;
/**
* An implementation of the {@link SpanProcessor} that converts the {@link ReadableSpan} to {@link
* SpanData} and passes it to the configured exporter.
*
* <p>Configuration options for {@link SimpleSpanProcessor} can be read from system properties,
* environment variables, or {@link java.util.Properties} objects.
*
* <p>For system properties and {@link java.util.Properties} objects, {@link SimpleSpanProcessor}
* will look for the following names:
*
* <ul>
* <li>{@code otel.ssp.export.sampled}: sets whether only sampled spans should be exported.
* </ul>
*
* <p>For environment variables, {@link SimpleSpanProcessor} will look for the following names:
*
* <ul>
* <li>{@code OTEL_SSP_EXPORT_SAMPLED}: sets whether only sampled spans should be exported.
* </ul>
*/
public final class SimpleSpanProcessor implements SpanProcessor {
@ -132,11 +148,6 @@ public final class SimpleSpanProcessor implements SpanProcessor {
/**
* Sets the configuration values from the given properties object for only the available keys.
* This method looks for the following keys:
*
* <ul>
* <li>{@code otel.ssp.export.sampled}: to set whether only sampled spans should be exported.
* </ul>
*
* @param properties {@link Properties} holding the configuration values.
* @return this.
@ -147,12 +158,7 @@ public final class SimpleSpanProcessor implements SpanProcessor {
}
/**
* Sets the configuration values from environment variables for only the available keys. This
* method looks for the following keys:
*
* <ul>
* <li>{@code OTEL_SSP_EXPORT_SAMPLED}: to set whether only sampled spans should be exported.
* </ul>
* Sets the configuration values from environment variables for only the available keys.
*
* @return this.
*/
@ -162,12 +168,7 @@ public final class SimpleSpanProcessor implements SpanProcessor {
}
/**
* Sets the configuration values from system properties for only the available keys. This method
* looks for the following keys:
*
* <ul>
* <li>{@code otel.ssp.export.sampled}: to set whether only sampled spans should be reported.
* </ul>
* Sets the configuration values from system properties for only the available keys.
*
* @return this.
*/

View File

@ -33,17 +33,17 @@
* <li>{@code REPORT_ONLY_SAMPLED: true} *
* </ul>
*
* <p>Values for {@link io.opentelemetry.sdk.trace.export.SimpleSpanProcessor} can be read from
* system properties, environment variables, or {@link java.util.Properties} objects.
* <p>Configuration options for {@link io.opentelemetry.sdk.trace.export.SimpleSpanProcessor} can be
* read from system properties, environment variables, or {@link java.util.Properties} objects.
*
* <p>For System Properties and {@link java.util.Properties} objects, {@link
* <p>For system properties and {@link java.util.Properties} objects, {@link
* io.opentelemetry.sdk.trace.export.SimpleSpanProcessor} will look for the following names:
*
* <ul>
* <li>{@code otel.ssp.export.sampled}: sets whether only sampled spans should be exported.
* </ul>
*
* <p>For Environment Variable, {@link io.opentelemetry.sdk.trace.export.SimpleSpanProcessor} will
* <p>For environment variables, {@link io.opentelemetry.sdk.trace.export.SimpleSpanProcessor} will
* look for the following names:
*
* <ul>
@ -60,10 +60,10 @@
* <li>{@code REPORT_ONLY_SAMPLED: true}
* </ul>
*
* <p>Values for {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor} can be read from
* system properties, environment variables, or {@link java.util.Properties} objects.
* <p>Configuration options for {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor} can be
* read from system properties, environment variables, or {@link java.util.Properties} objects.
*
* <p>For System Properties and {@link java.util.Properties} objects, {@link
* <p>For system properties and {@link java.util.Properties} objects, {@link
* io.opentelemetry.sdk.trace.export.BatchSpanProcessor} will look for the following names:
*
* <ul>
@ -74,7 +74,7 @@
* <li>{@code otel.bsp.export.sampled}: sets whether only sampled spans should be exported.
* </ul>
*
* <p>For Environment Variable, {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor} will
* <p>For environment variables, {@link io.opentelemetry.sdk.trace.export.BatchSpanProcessor} will
* look for the following names:
*
* <ul>