Skip to content

Commit 167095c

Browse files
committed
consistent naming
1 parent 42c5fa1 commit 167095c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ private static boolean defaultEnabled(ConfigProvider configProvider) {
7676
return true;
7777
}
7878

79-
String profile =
79+
String mode =
8080
instrumentationConfig
8181
.getStructured("java", empty())
8282
.getStructured("agent", empty())
8383
.getString("instrumentation_mode", "default");
8484

85-
switch (profile) {
85+
switch (mode) {
8686
case "none":
8787
return false;
8888
case "default":
8989
return true;
9090
default:
91-
throw new ConfigurationException("Unknown instrumentation profile: " + profile);
91+
throw new ConfigurationException("Unknown instrumentation mode: " + mode);
9292
}
9393
}
9494

javaagent-tooling/src/test/java/io/opentelemetry/javaagent/tooling/OpenTelemetryInstallerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ void globalOpenTelemetry() {
5151
})
5252
void defaultEnabledInDeclarativeConfigPropertiesBridge(
5353
String propertyValue, boolean expected, boolean fail) {
54-
String profile = propertyValue == null ? "" : "instrumentation_mode: \"" + propertyValue + "\"";
54+
String mode = propertyValue == null ? "" : "instrumentation_mode: \"" + propertyValue + "\"";
5555
String yaml =
5656
"file_format: \"1.0-rc.1\"\n"
5757
+ "instrumentation/development:\n"
5858
+ " java:\n"
5959
+ " agent:\n"
6060
+ " "
61-
+ profile;
61+
+ mode;
6262

6363
Supplier<ConfigProperties> configPropertiesSupplier =
6464
() ->
@@ -71,7 +71,7 @@ void defaultEnabledInDeclarativeConfigPropertiesBridge(
7171
if (fail) {
7272
assertThatCode(() -> configPropertiesSupplier.get())
7373
.isInstanceOf(ConfigurationException.class)
74-
.hasMessage("Unknown instrumentation profile: invalid");
74+
.hasMessage("Unknown instrumentation mode: invalid");
7575
} else {
7676
assertThat(
7777
configPropertiesSupplier

0 commit comments

Comments
 (0)