Skip to content

Commit 42f8313

Browse files
authored
Undeprecate ConfigProperties API methods (#19251)
1 parent 8060510 commit 42f8313

7 files changed

Lines changed: 0 additions & 21 deletions

File tree

javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@ public interface IgnoredTypesConfigurer extends Ordered {
2222
* Configure the passed {@code builder} and define which classes should be ignored when
2323
* instrumenting.
2424
*/
25-
// TODO remove default implementation in next major release when deleting the deprecated method
2625
default void configure(IgnoredTypesBuilder builder) {}
2726

2827
/**
2928
* Configure the passed {@code builder} and define which classes should be ignored when
3029
* instrumenting.
31-
*
32-
* @deprecated Use {@link #configure(IgnoredTypesBuilder)} instead. Will be removed in 3.0.
3330
*/
34-
@Deprecated // to be removed in 3.0
3531
default void configure(IgnoredTypesBuilder builder, ConfigProperties config) {
3632
configure(builder);
3733
}

javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/instrumentation/InstrumentationModule.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ public boolean defaultEnabled() {
9393
/**
9494
* Allows instrumentation modules to disable themselves by default, or to additionally disable
9595
* themselves on some other condition.
96-
*
97-
* @deprecated Use {@link #defaultEnabled()} instead. Will be removed in 3.0.
9896
*/
99-
@Deprecated // to be removed in 3.0
10097
public boolean defaultEnabled(ConfigProperties config) {
10198
return defaultEnabled();
10299
}

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentExtension.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ default AgentBuilder extend(AgentBuilder agentBuilder) {
3535
*
3636
* @return The customized agent. Note that this method MUST return a non-null {@link AgentBuilder}
3737
* instance that contains all customizations defined in this extension.
38-
* @deprecated Use {@link #extend(AgentBuilder)} instead. Will be removed in 3.0.
3938
*/
40-
@Deprecated // to be removed in 3.0
4139
default AgentBuilder extend(AgentBuilder agentBuilder, ConfigProperties config) {
4240
return extend(agentBuilder);
4341
}

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentInstaller.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ public static void installBytebuddyAgent(Instrumentation inst, ClassLoader exten
105105
}
106106
}
107107

108-
// Need to call deprecated API for backward compatibility with extensions that haven't migrated.
109-
@SuppressWarnings("deprecation")
110108
private static void installBytebuddyAgent(
111109
Instrumentation inst,
112110
ClassLoader extensionClassLoader,
@@ -273,8 +271,6 @@ private static void installEarlyInstrumentation(
273271
agentBuilder.installOn(instrumentation);
274272
}
275273

276-
// Need to call deprecated API for backward compatibility with extensions that haven't migrated.
277-
@SuppressWarnings("deprecation")
278274
private static void setBootstrapPackages(
279275
ConfigProperties config, ClassLoader extensionClassLoader) {
280276
BootstrapPackagesBuilderImpl builder = new BootstrapPackagesBuilderImpl();
@@ -289,8 +285,6 @@ private static void setDefineClassHandler() {
289285
DefineClassHelper.internalSetHandler(DefineClassHandler.INSTANCE);
290286
}
291287

292-
// Need to call deprecated API for backward compatibility with extensions that haven't migrated.
293-
@SuppressWarnings("deprecation")
294288
private static AgentBuilder configureIgnoredTypes(
295289
ConfigProperties config, ClassLoader extensionClassLoader, AgentBuilder agentBuilder) {
296290
IgnoredTypesBuilderImpl builder = new IgnoredTypesBuilderImpl();

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/bootstrap/BootstrapPackagesConfigurer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ default void configure(BootstrapPackagesBuilder builder) {}
2929
/**
3030
* Configure the passed {@code builder} and define which classes should always be loaded by the
3131
* bootstrap class loader.
32-
*
33-
* @deprecated Use {@link #configure(BootstrapPackagesBuilder)} instead. Will be removed in 3.0.
3432
*/
35-
@Deprecated // to be removed in 3.0
3633
default void configure(BootstrapPackagesBuilder builder, ConfigProperties config) {
3734
configure(builder);
3835
}

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/instrumentation/InstrumentationModuleInstaller.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ public InstrumentationModuleInstaller(
7575
ClassFileLocator.ForClassLoader.of(extensionsClassLoader)));
7676
}
7777

78-
// Need to call deprecated API for backward compatibility with modules that haven't migrated
79-
@SuppressWarnings("deprecation")
8078
AgentBuilder install(
8179
InstrumentationModule instrumentationModule,
8280
AgentBuilder parentAgentBuilder,

testing/agent-exporter/src/main/java/io/opentelemetry/javaagent/testing/bytebuddy/TestAgentListener.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ private static Trie<IgnoreAllow> buildAdditionalLibraryIgnores() {
4949
return builder.buildIgnoredTypesTrie();
5050
}
5151

52-
@SuppressWarnings("deprecation") // supporting deprecated method for backward compatibility
5352
private static Trie<IgnoreAllow> buildOtherConfiguredIgnores() {
5453
IgnoredTypesBuilderImpl builder = new IgnoredTypesBuilderImpl();
5554
for (IgnoredTypesConfigurer configurer :

0 commit comments

Comments
 (0)