File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/config Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,14 @@ public final class AgentConfig {
11
11
12
12
public static boolean isInstrumentationEnabled (
13
13
ConfigProperties config , Iterable <String > instrumentationNames , boolean defaultEnabled ) {
14
- // If default is enabled, we want to enable individually,
15
- // if default is disabled, we want to disable individually.
16
- boolean anyEnabled = defaultEnabled ;
17
14
for (String name : instrumentationNames ) {
18
15
String propertyName = "otel.instrumentation." + name + ".enabled" ;
19
- boolean enabled = config .getBoolean (propertyName , defaultEnabled );
20
-
21
- if (defaultEnabled ) {
22
- anyEnabled &= enabled ;
23
- } else {
24
- anyEnabled |= enabled ;
16
+ Boolean enabled = config .getBoolean (propertyName );
17
+ if (enabled != null ) {
18
+ return enabled ;
25
19
}
26
20
}
27
- return anyEnabled ;
21
+ return defaultEnabled ;
28
22
}
29
23
30
24
public static boolean isDebugModeEnabled (ConfigProperties config ) {
You can’t perform that action at this time.
0 commit comments