move the SupportabilityMetrics class and make package-private
MODIFY
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/tracer/BaseTracer.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/tracer/BaseTracer.java
@@ -19,7 +19,6 @@ import io.opentelemetry.context.propagation.TextMapGetter;
import io.opentelemetry.instrumentation.api.InstrumentationVersion;
import io.opentelemetry.instrumentation.api.config.Config;
import io.opentelemetry.instrumentation.api.context.ContextPropagationDebug;
-import io.opentelemetry.instrumentation.api.tracer.utils.SupportabilityMetrics;
import java.lang.reflect.Method;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

RENAME
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/tracer/utils/SupportabilityMetrics.java
instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/tracer/SupportabilityMetrics.java
* SPDX-License-Identifier: Apache-2.0
*/
-package io.opentelemetry.instrumentation.api.tracer.utils;
+package io.opentelemetry.instrumentation.api.tracer;
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.instrumentation.api.config.Config;
@@ -16,7 +16,7 @@ import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SupportabilityMetrics {
+class SupportabilityMetrics {
private static final Logger log = LoggerFactory.getLogger(SupportabilityMetrics.class);
private final boolean agentDebugEnabled;
private final Consumer<String> reporter;
@@ -33,7 +33,7 @@ public class SupportabilityMetrics {
this.reporter = reporter;
}
- public void recordSuppressedSpan(SpanKind kind, String instrumentationName) {
+ void recordSuppressedSpan(SpanKind kind, String instrumentationName) {
if (!agentDebugEnabled) {
return;
}
@@ -57,7 +57,7 @@ public class SupportabilityMetrics {
});
}
- public SupportabilityMetrics start() {
+ SupportabilityMetrics start() {
if (agentDebugEnabled) {
Executors.newScheduledThreadPool(
1,

RENAME
instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/tracer/utils/SupportabilityMetricsTest.java
instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/tracer/SupportabilityMetricsTest.java
* SPDX-License-Identifier: Apache-2.0
*/
-package io.opentelemetry.instrumentation.api.tracer.utils;
+package io.opentelemetry.instrumentation.api.tracer;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;

move the SupportabilityMetrics class and make package-private (#2427)