diff --git a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/AgentListener.java b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/AgentListener.java index b9e53de960ae..4cbcbfb8970b 100644 --- a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/AgentListener.java +++ b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/AgentListener.java @@ -6,6 +6,7 @@ package io.opentelemetry.javaagent.extension; import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; +import io.opentelemetry.sdk.autoconfigure.spi.Ordered; import java.lang.instrument.Instrumentation; import net.bytebuddy.agent.builder.AgentBuilder; diff --git a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/Ordered.java b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/Ordered.java deleted file mode 100644 index 76b7f0dd18e7..000000000000 --- a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/Ordered.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.javaagent.extension; - -public interface Ordered { - /** - * Returns the order of applying the SPI implementing this interface. Higher values are added - * later, for example: an SPI with order=1 will run after an SPI with order=0. - */ - default int order() { - return 0; - } -} diff --git a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java index e72794bec294..1f2b20327335 100644 --- a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java +++ b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java @@ -5,8 +5,8 @@ package io.opentelemetry.javaagent.extension.ignore; -import io.opentelemetry.javaagent.extension.Ordered; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; +import io.opentelemetry.sdk.autoconfigure.spi.Ordered; /** * An {@link IgnoredTypesConfigurer} can be used to augment built-in instrumentation restrictions: diff --git a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java index 76a2d75c23c1..f57d1e67ee51 100644 --- a/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java +++ b/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java @@ -9,8 +9,8 @@ import static java.util.Collections.unmodifiableSet; import static net.bytebuddy.matcher.ElementMatchers.any; -import io.opentelemetry.javaagent.extension.Ordered; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; +import io.opentelemetry.sdk.autoconfigure.spi.Ordered; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; diff --git a/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java b/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java index 9b9c61ec801c..556c1bbfdf2d 100644 --- a/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java +++ b/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java @@ -5,9 +5,9 @@ package io.opentelemetry.javaagent.tooling; -import io.opentelemetry.javaagent.extension.Ordered; import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; +import io.opentelemetry.sdk.autoconfigure.spi.Ordered; import net.bytebuddy.agent.builder.AgentBuilder; /** diff --git a/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/BeforeAgentListener.java b/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/BeforeAgentListener.java index 674fda39887f..e7597599fee1 100644 --- a/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/BeforeAgentListener.java +++ b/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/BeforeAgentListener.java @@ -5,8 +5,8 @@ package io.opentelemetry.javaagent.tooling; -import io.opentelemetry.javaagent.extension.Ordered; import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; +import io.opentelemetry.sdk.autoconfigure.spi.Ordered; import net.bytebuddy.agent.builder.AgentBuilder; /** diff --git a/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/SafeServiceLoader.java b/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/SafeServiceLoader.java index eba3c98f8fb6..3d56248387da 100644 --- a/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/SafeServiceLoader.java +++ b/javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/SafeServiceLoader.java @@ -7,7 +7,7 @@ import static java.util.logging.Level.FINE; -import io.opentelemetry.javaagent.extension.Ordered; +import io.opentelemetry.sdk.autoconfigure.spi.Ordered; import java.util.ArrayList; import java.util.Comparator; import java.util.Iterator;