move the SupportabilityMetrics class and make package-private (#2427)
This commit is contained in:
parent
03bfaee5eb
commit
6fed672dc6
|
@ -19,7 +19,6 @@ import io.opentelemetry.context.propagation.TextMapGetter;
|
||||||
import io.opentelemetry.instrumentation.api.InstrumentationVersion;
|
import io.opentelemetry.instrumentation.api.InstrumentationVersion;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
import io.opentelemetry.instrumentation.api.config.Config;
|
||||||
import io.opentelemetry.instrumentation.api.context.ContextPropagationDebug;
|
import io.opentelemetry.instrumentation.api.context.ContextPropagationDebug;
|
||||||
import io.opentelemetry.instrumentation.api.tracer.utils.SupportabilityMetrics;
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* 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.api.trace.SpanKind;
|
||||||
import io.opentelemetry.instrumentation.api.config.Config;
|
import io.opentelemetry.instrumentation.api.config.Config;
|
||||||
|
@ -16,7 +16,7 @@ import java.util.function.Consumer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class SupportabilityMetrics {
|
class SupportabilityMetrics {
|
||||||
private static final Logger log = LoggerFactory.getLogger(SupportabilityMetrics.class);
|
private static final Logger log = LoggerFactory.getLogger(SupportabilityMetrics.class);
|
||||||
private final boolean agentDebugEnabled;
|
private final boolean agentDebugEnabled;
|
||||||
private final Consumer<String> reporter;
|
private final Consumer<String> reporter;
|
||||||
|
@ -33,7 +33,7 @@ public class SupportabilityMetrics {
|
||||||
this.reporter = reporter;
|
this.reporter = reporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void recordSuppressedSpan(SpanKind kind, String instrumentationName) {
|
void recordSuppressedSpan(SpanKind kind, String instrumentationName) {
|
||||||
if (!agentDebugEnabled) {
|
if (!agentDebugEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public class SupportabilityMetrics {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public SupportabilityMetrics start() {
|
SupportabilityMetrics start() {
|
||||||
if (agentDebugEnabled) {
|
if (agentDebugEnabled) {
|
||||||
Executors.newScheduledThreadPool(
|
Executors.newScheduledThreadPool(
|
||||||
1,
|
1,
|
|
@ -3,7 +3,7 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* 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 java.util.Collections.singletonList;
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
Loading…
Reference in New Issue