Fix extension shading
ADD
examples/extension/src/main/java/com/example/javaagent/DemoIgnoredTypesConfigurer.java
+package com.example.javaagent;
+
+import com.google.auto.service.AutoService;
+import io.opentelemetry.instrumentation.api.config.Config;
+import io.opentelemetry.javaagent.extension.ignore.IgnoredTypesBuilder;
+import io.opentelemetry.javaagent.extension.ignore.IgnoredTypesConfigurer;
+
+/**
+ * Custom {@link IgnoredTypesConfigurer} which exists currently only to verify correct shading.
+ *
+ * @see io.opentelemetry.javaagent.extension.ignore.IgnoredTypesConfigurer
+ */
+@AutoService(IgnoredTypesConfigurer.class)
+public class DemoIgnoredTypesConfigurer implements IgnoredTypesConfigurer {
+
+ @Override
+ public void configure(Config config, IgnoredTypesBuilder builder) {}
+}

MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/RemappingUrlConnection.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/RemappingUrlConnection.java
@@ -31,7 +31,7 @@ public class RemappingUrlConnection extends URLConnection {
"#io.opentelemetry.javaagent.shaded.io.opentelemetry.context"),
rule(
"#io.opentelemetry.instrumentation",
- "#io.opentelemetry.javaagent.shaded.io.opentelemetry.instrumentation"),
+ "#io.opentelemetry.javaagent.shaded.instrumentation"),
rule(
"#io.opentelemetry.semconv",
"#io.opentelemetry.javaagent.shaded.io.opentelemetry.semconv"),

Fix extension shading (#4064)