Skip to content

Commit 9b92dcd

Browse files
committed
refactor: change variable names too
1 parent 554d172 commit 9b92dcd

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,13 +1213,13 @@ private static boolean isFeatureEnabled(AgentFeature feature) {
12131213
final String featureSystemProp = feature.getSystemProp();
12141214
String featureEnabled = System.getProperty(featureSystemProp);
12151215
if (featureEnabled == null) {
1216-
featureEnabled = getStableConfig(StableConfigSource.MANAGED, featureConfigKey);
1216+
featureEnabled = getStableConfig(StableConfigSource.FLEET, featureConfigKey);
12171217
}
12181218
if (featureEnabled == null) {
12191219
featureEnabled = ddGetEnv(featureSystemProp);
12201220
}
12211221
if (featureEnabled == null) {
1222-
featureEnabled = getStableConfig(StableConfigSource.USER, featureConfigKey);
1222+
featureEnabled = getStableConfig(StableConfigSource.LOCAL, featureConfigKey);
12231223
}
12241224

12251225
if (feature.isEnabledByDefault()) {
@@ -1243,13 +1243,13 @@ private static boolean isFullyDisabled(final AgentFeature feature) {
12431243
final String featureSystemProp = feature.getSystemProp();
12441244
String settingValue = getNullIfEmpty(System.getProperty(featureSystemProp));
12451245
if (settingValue == null) {
1246-
settingValue = getNullIfEmpty(getStableConfig(StableConfigSource.MANAGED, featureConfigKey));
1246+
settingValue = getNullIfEmpty(getStableConfig(StableConfigSource.FLEET, featureConfigKey));
12471247
}
12481248
if (settingValue == null) {
12491249
settingValue = getNullIfEmpty(ddGetEnv(featureSystemProp));
12501250
}
12511251
if (settingValue == null) {
1252-
settingValue = getNullIfEmpty(getStableConfig(StableConfigSource.USER, featureConfigKey));
1252+
settingValue = getNullIfEmpty(getStableConfig(StableConfigSource.LOCAL, featureConfigKey));
12531253
}
12541254

12551255
// defaults to inactive

internal-api/src/main/java/datadog/trace/api/ConfigOrigin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public enum ConfigOrigin {
88
/** configurations that are set through JVM properties */
99
JVM_PROP("jvm_prop"),
1010
/** configuration read in the stable config file, managed by users */
11-
USER_STABLE_CONFIG("local_stable_config"),
11+
LOCAL_STABLE_CONFIG("local_stable_config"),
1212
/** configuration read in the stable config file, managed by fleet */
13-
MANAGED_STABLE_CONFIG("fleet_stable_config"),
13+
FLEET_STABLE_CONFIG("fleet_stable_config"),
1414
/** set when the user has not set any configuration for the key (defaults to a value) */
1515
DEFAULT("default");
1616

internal-api/src/main/java/datadog/trace/bootstrap/config/provider/ConfigProvider.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -356,19 +356,19 @@ public static ConfigProvider createDefault() {
356356
if (configProperties.isEmpty()) {
357357
return new ConfigProvider(
358358
new SystemPropertiesConfigSource(),
359-
StableConfigSource.MANAGED,
359+
StableConfigSource.FLEET,
360360
new EnvironmentConfigSource(),
361361
new OtelEnvironmentConfigSource(),
362-
StableConfigSource.USER,
362+
StableConfigSource.LOCAL,
363363
new CapturedEnvironmentConfigSource());
364364
} else {
365365
return new ConfigProvider(
366366
new SystemPropertiesConfigSource(),
367-
StableConfigSource.MANAGED,
367+
StableConfigSource.FLEET,
368368
new EnvironmentConfigSource(),
369369
new PropertiesConfigSource(configProperties, true),
370370
new OtelEnvironmentConfigSource(configProperties),
371-
StableConfigSource.USER,
371+
StableConfigSource.LOCAL,
372372
new CapturedEnvironmentConfigSource());
373373
}
374374
}
@@ -382,20 +382,20 @@ public static ConfigProvider withoutCollector() {
382382
return new ConfigProvider(
383383
false,
384384
new SystemPropertiesConfigSource(),
385-
StableConfigSource.MANAGED,
385+
StableConfigSource.FLEET,
386386
new EnvironmentConfigSource(),
387387
new OtelEnvironmentConfigSource(),
388-
StableConfigSource.USER,
388+
StableConfigSource.LOCAL,
389389
new CapturedEnvironmentConfigSource());
390390
} else {
391391
return new ConfigProvider(
392392
false,
393393
new SystemPropertiesConfigSource(),
394-
StableConfigSource.MANAGED,
394+
StableConfigSource.FLEET,
395395
new EnvironmentConfigSource(),
396396
new PropertiesConfigSource(configProperties, true),
397397
new OtelEnvironmentConfigSource(configProperties),
398-
StableConfigSource.USER,
398+
StableConfigSource.LOCAL,
399399
new CapturedEnvironmentConfigSource());
400400
}
401401
}
@@ -411,21 +411,21 @@ public static ConfigProvider withPropertiesOverride(Properties properties) {
411411
if (configProperties.isEmpty()) {
412412
return new ConfigProvider(
413413
new SystemPropertiesConfigSource(),
414-
StableConfigSource.MANAGED,
414+
StableConfigSource.FLEET,
415415
new EnvironmentConfigSource(),
416416
providedConfigSource,
417417
new OtelEnvironmentConfigSource(),
418-
StableConfigSource.USER,
418+
StableConfigSource.LOCAL,
419419
new CapturedEnvironmentConfigSource());
420420
} else {
421421
return new ConfigProvider(
422422
providedConfigSource,
423423
new SystemPropertiesConfigSource(),
424-
StableConfigSource.MANAGED,
424+
StableConfigSource.FLEET,
425425
new EnvironmentConfigSource(),
426426
new PropertiesConfigSource(configProperties, true),
427427
new OtelEnvironmentConfigSource(configProperties),
428-
StableConfigSource.USER,
428+
StableConfigSource.LOCAL,
429429
new CapturedEnvironmentConfigSource());
430430
}
431431
}

internal-api/src/main/java/datadog/trace/bootstrap/config/provider/StableConfigSource.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
public final class StableConfigSource extends ConfigProvider.Source {
1313
private static final Logger log = LoggerFactory.getLogger(StableConfigSource.class);
1414

15-
public static final String USER_STABLE_CONFIG_PATH =
15+
public static final String LOCAL_STABLE_CONFIG_PATH =
1616
"/etc/datadog-agent/application_monitoring.yaml";
17-
public static final String MANAGED_STABLE_CONFIG_PATH =
17+
public static final String FLEET_STABLE_CONFIG_PATH =
1818
"/etc/datadog-agent/managed/datadog-agent/stable/application_monitoring.yaml";
19-
public static final StableConfigSource USER =
20-
new StableConfigSource(USER_STABLE_CONFIG_PATH, ConfigOrigin.USER_STABLE_CONFIG);
21-
public static final StableConfigSource MANAGED =
19+
public static final StableConfigSource LOCAL =
20+
new StableConfigSource(LOCAL_STABLE_CONFIG_PATH, ConfigOrigin.LOCAL_STABLE_CONFIG);
21+
public static final StableConfigSource FLEET =
2222
new StableConfigSource(
23-
StableConfigSource.MANAGED_STABLE_CONFIG_PATH, ConfigOrigin.MANAGED_STABLE_CONFIG);
23+
StableConfigSource.FLEET_STABLE_CONFIG_PATH, ConfigOrigin.FLEET_STABLE_CONFIG);
2424

2525
private final ConfigOrigin fileOrigin;
2626

0 commit comments

Comments
 (0)