|
5 | 5 |
|
6 | 6 | package io.opentelemetry.javaagent.bootstrap.internal;
|
7 | 7 |
|
8 |
| -import static java.util.Collections.emptyList; |
9 | 8 | import static java.util.Collections.emptyMap;
|
10 | 9 |
|
11 | 10 | import java.util.List;
|
@@ -33,14 +32,29 @@ public static CommonConfig get() {
|
33 | 32 | CommonConfig(InstrumentationConfig config) {
|
34 | 33 | peerServiceMapping =
|
35 | 34 | config.getMap("otel.instrumentation.common.peer-service-mapping", emptyMap());
|
| 35 | + |
| 36 | + // TODO (mateusz): remove the old config names in 2.0 |
36 | 37 | clientRequestHeaders =
|
37 |
| - config.getList("otel.instrumentation.http.capture-headers.client.request", emptyList()); |
| 38 | + DeprecatedConfigProperties.getList( |
| 39 | + config, |
| 40 | + "otel.instrumentation.http.capture-headers.client.request", |
| 41 | + "otel.instrumentation.http.client.capture-request-headers"); |
38 | 42 | clientResponseHeaders =
|
39 |
| - config.getList("otel.instrumentation.http.capture-headers.client.response", emptyList()); |
| 43 | + DeprecatedConfigProperties.getList( |
| 44 | + config, |
| 45 | + "otel.instrumentation.http.capture-headers.client.response", |
| 46 | + "otel.instrumentation.http.client.capture-response-headers"); |
40 | 47 | serverRequestHeaders =
|
41 |
| - config.getList("otel.instrumentation.http.capture-headers.server.request", emptyList()); |
| 48 | + DeprecatedConfigProperties.getList( |
| 49 | + config, |
| 50 | + "otel.instrumentation.http.capture-headers.server.request", |
| 51 | + "otel.instrumentation.http.server.capture-request-headers"); |
42 | 52 | serverResponseHeaders =
|
43 |
| - config.getList("otel.instrumentation.http.capture-headers.server.response", emptyList()); |
| 53 | + DeprecatedConfigProperties.getList( |
| 54 | + config, |
| 55 | + "otel.instrumentation.http.capture-headers.server.response", |
| 56 | + "otel.instrumentation.http.server.capture-response-headers"); |
| 57 | + |
44 | 58 | statementSanitizationEnabled =
|
45 | 59 | config.getBoolean("otel.instrumentation.common.db-statement-sanitizer.enabled", true);
|
46 | 60 | }
|
|
0 commit comments