Remove agent's Ordered interface and use the SDK one
MODIFY
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/AgentListener.java
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/AgentListener.java
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;

DELETE
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/Ordered.java
-/*
- * 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;
- }
-}

MODIFY
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java
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:

MODIFY
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java
javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java
@@ -9,8 +9,8 @@ import static java.util.Arrays.asList;
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;

MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java
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;
/**

MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/BeforeAgentListener.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/BeforeAgentListener.java
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;
/**

MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/SafeServiceLoader.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/SafeServiceLoader.java
@@ -7,7 +7,7 @@ package io.opentelemetry.javaagent.tooling;
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;

Remove agent's Ordered interface and use the SDK one (#6589)