Skip to content

Commit

Permalink
Remove the @UnstableApi annotation (open-telemetry#5757)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek authored and RashmiRam committed May 23, 2022
1 parent bff4999 commit aec8311
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
* Provides implementations of strategies for instrumenting methods that return asynchronous and/or
* reactive values so that the operation can be ended when the asynchronous type completes.
*/
@UnstableApi
package io.opentelemetry.instrumentation.api.annotation.support.async;

import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
/** Provides utility classes to provide support for instrumenting annotated methods. */
@UnstableApi
package io.opentelemetry.instrumentation.api.annotation.support;

import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

package io.opentelemetry.instrumentation.api.config;

import io.opentelemetry.instrumentation.api.annotations.UnstableApi;

@UnstableApi
public final class ExperimentalConfig {

private static final ExperimentalConfig instance = new ExperimentalConfig(Config.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.context.Context;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
import io.opentelemetry.instrumentation.api.internal.SpanKey;
import io.opentelemetry.instrumentation.api.internal.SpanKeyProvider;
Expand Down Expand Up @@ -47,7 +46,6 @@ public final void onEnd(
* This method is internal and is hence not for public use. Its API is unstable and can change at
* any time.
*/
@UnstableApi
@Override
public SpanKey internalGetSpanKey() {
return SpanKey.DB_CLIENT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.context.Context;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.internal.SpanKey;
import io.opentelemetry.instrumentation.api.internal.SpanKeyProvider;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
Expand Down Expand Up @@ -73,7 +72,6 @@ public void onEnd(
* This method is internal and is hence not for public use. Its API is unstable and can change at
* any time.
*/
@UnstableApi
@Override
public SpanKey internalGetSpanKey() {
return SpanKey.HTTP_CLIENT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.ContextKey;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.instrumenter.RequestListener;
import io.opentelemetry.instrumentation.api.instrumenter.RequestMetrics;
import java.util.concurrent.TimeUnit;
Expand All @@ -25,7 +24,6 @@
* href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md#http-client">HTTP
* client metrics</a>.
*/
@UnstableApi
public final class HttpClientMetrics implements RequestListener {

private static final double NANOS_PER_MS = TimeUnit.MILLISECONDS.toNanos(1);
Expand All @@ -40,7 +38,6 @@ public final class HttpClientMetrics implements RequestListener {
* HttpClientMetrics} on an {@link
* io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder}.
*/
@UnstableApi
public static RequestMetrics get() {
return HttpClientMetrics::new;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.ContextKey;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.instrumenter.RequestListener;
import io.opentelemetry.instrumentation.api.instrumenter.RequestMetrics;
import java.util.concurrent.TimeUnit;
Expand All @@ -27,7 +26,6 @@
* href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/http-metrics.md#http-server">HTTP
* server metrics</a>.
*/
@UnstableApi
public final class HttpServerMetrics implements RequestListener {

private static final double NANOS_PER_MS = TimeUnit.MILLISECONDS.toNanos(1);
Expand All @@ -42,7 +40,6 @@ public final class HttpServerMetrics implements RequestListener {
* HttpServerMetrics} on an {@link
* io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder}.
*/
@UnstableApi
public static RequestMetrics get() {
return HttpServerMetrics::new;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import io.opentelemetry.api.common.AttributesBuilder;
import io.opentelemetry.context.Context;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor;
import io.opentelemetry.instrumentation.api.internal.SpanKey;
import io.opentelemetry.instrumentation.api.internal.SpanKeyProvider;
Expand Down Expand Up @@ -96,7 +95,6 @@ public void onEnd(
* This method is internal and is hence not for public use. Its API is unstable and can change at
* any time.
*/
@UnstableApi
@Override
public SpanKey internalGetSpanKey() {
switch (operation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package io.opentelemetry.instrumentation.api.instrumenter.rpc;

import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.internal.SpanKey;
import io.opentelemetry.instrumentation.api.internal.SpanKeyProvider;

Expand Down Expand Up @@ -34,7 +33,6 @@ private RpcClientAttributesExtractor(RpcAttributesGetter<REQUEST> getter) {
* This method is internal and is hence not for public use. Its API is unstable and can change at
* any time.
*/
@UnstableApi
@Override
public SpanKey internalGetSpanKey() {
return SpanKey.RPC_CLIENT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.ContextKey;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.instrumenter.RequestListener;
import io.opentelemetry.instrumentation.api.instrumenter.RequestMetrics;
import java.util.concurrent.TimeUnit;
Expand All @@ -25,7 +24,6 @@
* href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/rpc.md#rpc-client">RPC
* client metrics</a>.
*/
@UnstableApi
public final class RpcClientMetrics implements RequestListener {

private static final double NANOS_PER_MS = TimeUnit.MILLISECONDS.toNanos(1);
Expand All @@ -51,7 +49,6 @@ private RpcClientMetrics(Meter meter) {
* RpcClientMetrics} on an {@link
* io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder}.
*/
@UnstableApi
public static RequestMetrics get() {
return RpcClientMetrics::new;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.ContextKey;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.instrumenter.RequestListener;
import io.opentelemetry.instrumentation.api.instrumenter.RequestMetrics;
import java.util.concurrent.TimeUnit;
Expand All @@ -25,7 +24,6 @@
* href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/rpc.md#rpc-server">RPC
* server metrics</a>.
*/
@UnstableApi
public final class RpcServerMetrics implements RequestListener {

private static final double NANOS_PER_MS = TimeUnit.MILLISECONDS.toNanos(1);
Expand All @@ -51,7 +49,6 @@ private RpcServerMetrics(Meter meter) {
* RpcServerMetrics} on an {@link
* io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder}.
*/
@UnstableApi
public static RequestMetrics get() {
return RpcServerMetrics::new;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static java.util.logging.Level.FINE;

import com.google.auto.value.AutoValue;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import java.time.Duration;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -56,7 +55,6 @@ static Config create(Map<String, String> allProperties) {
* <p>This method is internal and is hence not for public use. Its API is unstable and can change
* at any time.
*/
@UnstableApi
public static void internalInitializeConfig(Config config) {
if (instance != null) {
logger.warning("Config#INSTANCE was already set earlier");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import io.opentelemetry.context.Context;
import io.opentelemetry.context.propagation.TextMapGetter;
import io.opentelemetry.context.propagation.TextMapSetter;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;
import io.opentelemetry.instrumentation.api.config.Config;
import io.opentelemetry.instrumentation.api.internal.SpanKey;
import io.opentelemetry.instrumentation.api.internal.SpanKeyProvider;
Expand Down Expand Up @@ -127,7 +126,6 @@ public InstrumenterBuilder<REQUEST, RESPONSE> addRequestListener(RequestListener
}

/** Adds a {@link RequestMetrics} whose metrics will be recorded for request start and end. */
@UnstableApi
public InstrumenterBuilder<REQUEST, RESPONSE> addRequestMetrics(RequestMetrics factory) {
requestListeners.add(factory.create(meter));
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
package io.opentelemetry.instrumentation.api.instrumenter;

import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.instrumentation.api.annotations.UnstableApi;

/** A factory for a {@link RequestListener} for recording metrics using a {@link Meter}. */
@FunctionalInterface
@UnstableApi
public interface RequestMetrics {
/** Returns a {@link RequestListener} for recording metrics using the given {@link Meter}. */
RequestListener create(Meter meter);
Expand Down

0 comments on commit aec8311

Please sign in to comment.