Skip to content

Commit

Permalink
Add since tag to instrumentation-api javadocs (#9986)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek authored Dec 1, 2023
1 parent 85eedf4 commit 95dde7f
Show file tree
Hide file tree
Showing 26 changed files with 79 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* Extractor of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/http/http-spans.md#http-client">HTTP
* client attributes</a>.
*
* @since 2.0.0
*/
public final class HttpClientAttributesExtractor<REQUEST, RESPONSE>
extends HttpCommonAttributesExtractor<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
import java.util.Set;
import java.util.function.ToIntFunction;

/** A builder of {@link HttpClientAttributesExtractor}. */
/**
* A builder of {@link HttpClientAttributesExtractor}.
*
* @since 2.0.0
*/
public final class HttpClientAttributesExtractorBuilder<REQUEST, RESPONSE> {

final HttpClientAttributesGetter<REQUEST, RESPONSE> httpAttributesGetter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* <p>Instrumentation authors will create implementations of this interface for their specific
* library/framework. It will be used by the {@link HttpClientAttributesExtractor} to obtain the
* various HTTP client attributes in a type-generic way.
*
* @since 2.0.0
*/
public interface HttpClientAttributesGetter<REQUEST, RESPONSE>
extends HttpCommonAttributesGetter<REQUEST, RESPONSE>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* {@link OperationListener} which keeps track of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/http/http-metrics.md#http-client">HTTP
* client metrics</a>.
*
* @since 2.0.0
*/
public final class HttpClientMetrics implements OperationListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;

/** A helper that keeps track of the count of the HTTP request resend attempts. */
/**
* A helper that keeps track of the count of the HTTP request resend attempts.
*
* @since 2.0.0
*/
public final class HttpClientRequestResendCount {

private static final ContextKey<HttpClientRequestResendCount> KEY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
import java.util.List;
import javax.annotation.Nullable;

/** An interface for getting HTTP attributes common to clients and servers. */
/**
* An interface for getting HTTP attributes common to clients and servers.
*
* @since 2.0.0
*/
public interface HttpCommonAttributesGetter<REQUEST, RESPONSE> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* Extractor of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/http/http-spans.md#http-server">HTTP
* server attributes</a>.
*
* @since 2.0.0
*/
public final class HttpServerAttributesExtractor<REQUEST, RESPONSE>
extends HttpCommonAttributesExtractor<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
import java.util.Set;
import java.util.function.Function;

/** A builder of {@link HttpServerAttributesExtractor}. */
/**
* A builder of {@link HttpServerAttributesExtractor}.
*
* @since 2.0.0
*/
public final class HttpServerAttributesExtractorBuilder<REQUEST, RESPONSE> {

final HttpServerAttributesGetter<REQUEST, RESPONSE> httpAttributesGetter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* <p>Instrumentation authors will create implementations of this interface for their specific
* library/framework. It will be used by the {@link HttpServerAttributesExtractor} to obtain the
* various HTTP server attributes in a type-generic way.
*
* @since 2.0.0
*/
public interface HttpServerAttributesGetter<REQUEST, RESPONSE>
extends HttpCommonAttributesGetter<REQUEST, RESPONSE>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* {@link OperationListener} which keeps track of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/http/http-metrics.md#http-server">HTTP
* server metrics</a>.
*
* @since 2.0.0
*/
public final class HttpServerMetrics implements OperationListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* later, after the instrumented operation starts. This class provides several static methods that
* allow the instrumentation author to provide the matching HTTP route to the instrumentation when
* it is discovered.
*
* @since 2.0.0
*/
public final class HttpServerRoute {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
import io.opentelemetry.context.Context;
import javax.annotation.Nullable;

/** An interface for getting the {@code http.route} attribute. */
/**
* An interface for getting the {@code http.route} attribute.
*
* @since 2.0.0
*/
@FunctionalInterface
public interface HttpServerRouteBiGetter<T, U> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
import java.util.HashSet;
import java.util.Set;

/** A builder of {@link HttpServerRoute}. */
/**
* A builder of {@link HttpServerRoute}.
*
* @since 2.0.0
*/
public final class HttpServerRouteBuilder<REQUEST> {

final HttpServerAttributesGetter<REQUEST, ?> getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
import io.opentelemetry.context.Context;
import javax.annotation.Nullable;

/** An interface for getting the {@code http.route} attribute. */
/**
* An interface for getting the {@code http.route} attribute.
*
* @since 2.0.0
*/
@FunctionalInterface
public interface HttpServerRouteGetter<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

package io.opentelemetry.instrumentation.api.semconv.http;

/** Represents the source that provided the {@code http.route} attribute. */
/**
* Represents the source that provided the {@code http.route} attribute.
*
* @since 2.0.0
*/
public enum HttpServerRouteSource {
/**
* Represents a "filter" that may execute before the actual server handler. E.g. the Servlet API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* Extractor of the <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/http/http-spans.md#name">HTTP
* span name</a>.
*
* @since 2.0.0
*/
public final class HttpSpanNameExtractor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
import java.util.Set;
import javax.annotation.Nullable;

/** A builder of {@link HttpSpanNameExtractor}. */
/**
* A builder of {@link HttpSpanNameExtractor}.
*
* @since 2.0.0
*/
public final class HttpSpanNameExtractorBuilder<REQUEST> {

@Nullable final HttpClientAttributesGetter<REQUEST, ?> clientGetter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* Extractor of the <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/http/http-spans.md#status">HTTP
* span status</a>.
*
* @since 2.0.0
*/
public final class HttpSpanStatusExtractor<REQUEST, RESPONSE>
implements SpanStatusExtractor<REQUEST, RESPONSE> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* Extractor of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/general/attributes.md#client-attributes">client
* attributes</a>.
*
* @since 2.0.0
*/
public final class ClientAttributesExtractor<REQUEST, RESPONSE>
implements AttributesExtractor<REQUEST, RESPONSE> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* <p>Instrumentation authors will create implementations of this interface for their specific
* library/framework. It will be used by the {@link ClientAttributesExtractor} (or other convention
* specific extractors) to obtain the various server attributes in a type-generic way.
*
* @since 2.0.0
*/
public interface ClientAttributesGetter<REQUEST> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Extractor of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/general/attributes.md#other-network-attributes">network
* attributes</a>.
*
* @since 2.0.0
*/
public final class NetworkAttributesExtractor<REQUEST, RESPONSE>
implements AttributesExtractor<REQUEST, RESPONSE> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* <p>Instrumentation authors will create implementations of this interface for their specific
* library/framework. It will be used by the {@link NetworkAttributesExtractor} (or other convention
* specific extractors) to obtain the various network attributes in a type-generic way.
*
* @since 2.0.0
*/
public interface NetworkAttributesGetter<REQUEST, RESPONSE> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* Extractor of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/general/attributes.md#server-attributes">server
* attributes</a>.
*
* @since 2.0.0
*/
public final class ServerAttributesExtractor<REQUEST, RESPONSE>
implements AttributesExtractor<REQUEST, RESPONSE> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* <p>Instrumentation authors will create implementations of this interface for their specific
* library/framework. It will be used by the {@link ServerAttributesExtractor} (or other convention
* specific extractors) to obtain the various server attributes in a type-generic way.
*
* @since 2.0.0
*/
public interface ServerAttributesGetter<REQUEST> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Extractor of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/v1.23.0/docs/url/url.md">URL
* attributes</a>.
*
* @since 2.0.0
*/
public final class UrlAttributesExtractor<REQUEST, RESPONSE>
implements AttributesExtractor<REQUEST, RESPONSE> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* <p>Instrumentation authors will create implementations of this interface for their specific
* library/framework. It will be used by the {@link UrlAttributesExtractor} (or other convention
* specific extractors) to obtain the various URL attributes in a type-generic way.
*
* @since 2.0.0
*/
public interface UrlAttributesGetter<REQUEST> {

Expand Down

0 comments on commit 95dde7f

Please sign in to comment.