|
@@ -5,7 +5,6 @@
|
|
|
|
|
|
package io.opentelemetry.javaagent.bootstrap.internal;
|
|
|
|
|
|
-import static java.util.Collections.emptyList;
|
|
|
import static java.util.Collections.emptyMap;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -33,14 +32,29 @@ public final class CommonConfig {
|
|
|
CommonConfig(InstrumentationConfig config) {
|
|
|
peerServiceMapping =
|
|
|
config.getMap("otel.instrumentation.common.peer-service-mapping", emptyMap());
|
|
|
+
|
|
|
+ // TODO (mateusz): remove the old config names in 2.0
|
|
|
clientRequestHeaders =
|
|
|
- config.getList("otel.instrumentation.http.capture-headers.client.request", emptyList());
|
|
|
+ DeprecatedConfigProperties.getList(
|
|
|
+ config,
|
|
|
+ "otel.instrumentation.http.capture-headers.client.request",
|
|
|
+ "otel.instrumentation.http.client.capture-request-headers");
|
|
|
clientResponseHeaders =
|
|
|
- config.getList("otel.instrumentation.http.capture-headers.client.response", emptyList());
|
|
|
+ DeprecatedConfigProperties.getList(
|
|
|
+ config,
|
|
|
+ "otel.instrumentation.http.capture-headers.client.response",
|
|
|
+ "otel.instrumentation.http.client.capture-response-headers");
|
|
|
serverRequestHeaders =
|
|
|
- config.getList("otel.instrumentation.http.capture-headers.server.request", emptyList());
|
|
|
+ DeprecatedConfigProperties.getList(
|
|
|
+ config,
|
|
|
+ "otel.instrumentation.http.capture-headers.server.request",
|
|
|
+ "otel.instrumentation.http.server.capture-request-headers");
|
|
|
serverResponseHeaders =
|
|
|
- config.getList("otel.instrumentation.http.capture-headers.server.response", emptyList());
|
|
|
+ DeprecatedConfigProperties.getList(
|
|
|
+ config,
|
|
|
+ "otel.instrumentation.http.capture-headers.server.response",
|
|
|
+ "otel.instrumentation.http.server.capture-response-headers");
|
|
|
+
|
|
|
statementSanitizationEnabled =
|
|
|
config.getBoolean("otel.instrumentation.common.db-statement-sanitizer.enabled", true);
|
|
|
}
|