Skip to content

Commit 79ea74a

Browse files
committed
Remove deprecated experimental redact-query-parameters and db-sqlcommenter configuration
1 parent 3838985 commit 79ea74a

42 files changed

Lines changed: 289 additions & 416 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/agents/knowledge/metadata-yaml-format.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Non-standard mappings (see `ConfigPropertiesBackedDeclarativeConfigProperties.ja
2929
| `otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters` | `general.sanitization.url.sensitive_query_parameters/development` |
3030
| `otel.semconv-stability.opt-in` | `general.semconv_stability.opt_in` |
3131
| `otel.instrumentation.http.known-methods` | `java.common.http.known_methods` |
32-
| `otel.instrumentation.http.client.experimental.redact-query-parameters` | `java.common.http.client.redact_query_parameters/development` |
3332
| `otel.instrumentation.http.client.emit-experimental-telemetry` | `java.common.http.client.emit_experimental_telemetry/development` |
3433
| `otel.instrumentation.http.server.emit-experimental-telemetry` | `java.common.http.server.emit_experimental_telemetry/development` |
3534
| `otel.instrumentation.messaging.experimental.receive-telemetry.enabled` | `java.common.messaging.receive_telemetry/development.enabled` |

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
use `setTraceIdRequestAttributeEnabled()` and `setCaptureRequestParameters()` respectively.
2020
- Removed the `opentelemetry-runtime-telemetry-java8` and `opentelemetry-runtime-telemetry-java17`
2121
library artifacts (deprecated aliases); use `opentelemetry-runtime-telemetry` instead.
22+
- Removed previously deprecated experimental config property
23+
`otel.instrumentation.http.client.experimental.redact-query-parameters`; use
24+
`otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters` instead.
25+
- Removed previously deprecated experimental config property
26+
`otel.instrumentation.common.experimental.db-sqlcommenter.enabled`; use
27+
`otel.instrumentation.common.db.experimental.sqlcommenter.enabled` instead.
2228

2329
## Version 2.27.0 (2026-04-21)
2430

declarative-config-bridge/src/main/java/io/opentelemetry/instrumentation/config/bridge/ConfigPropertiesBackedDeclarativeConfigProperties.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ public final class ConfigPropertiesBackedDeclarativeConfigProperties
5454
// moving common http, database, messaging, and gen_ai configs under common
5555
SPECIAL_MAPPINGS.put(
5656
"java.common.http.known_methods", "otel.instrumentation.http.known-methods");
57-
SPECIAL_MAPPINGS.put(
58-
"java.common.http.client.redact_query_parameters/development",
59-
"otel.instrumentation.http.client.experimental.redact-query-parameters");
6057
SPECIAL_MAPPINGS.put(
6158
"java.common.http.client.emit_experimental_telemetry/development",
6259
"otel.instrumentation.http.client.emit-experimental-telemetry");

declarative-config-bridge/src/test/java/io/opentelemetry/instrumentation/config/bridge/ConfigPropertiesBackedDeclarativeConfigPropertiesTest.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,6 @@ void testDeprecatedCommonDbStatementSanitizerMapping() {
144144
.isNull();
145145
}
146146

147-
@Test
148-
void testCommonDbSqlcommenterPropertyMapping() {
149-
DeclarativeConfigProperties config =
150-
createConfig("otel.instrumentation.common.experimental.db-sqlcommenter.enabled", "false");
151-
152-
assertThat(
153-
config
154-
.getStructured("java")
155-
.getStructured("common")
156-
.getStructured("db_sqlcommenter/development")
157-
.getBoolean("enabled"))
158-
.isFalse();
159-
assertThat(
160-
config
161-
.getStructured("java")
162-
.getStructured("common")
163-
.getStructured("db")
164-
.getStructured("sqlcommenter/development")
165-
.getBoolean("enabled"))
166-
.isNull();
167-
}
168-
169147
@Test
170148
void testGraphqlQuerySanitizationMapping() {
171149
DeclarativeConfigProperties config =

docs/instrumentation-list.yaml

Lines changed: 133 additions & 158 deletions
Large diffs are not rendered by default.

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/config/internal/CommonConfig.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
package io.opentelemetry.instrumentation.api.incubator.config.internal;
77

8-
import static java.util.Collections.emptySet;
9-
108
import io.opentelemetry.api.OpenTelemetry;
119
import io.opentelemetry.api.incubator.config.DeclarativeConfigProperties;
1210
import io.opentelemetry.instrumentation.api.incubator.log.LoggingContextConstants;
@@ -15,16 +13,13 @@
1513
import java.util.HashSet;
1614
import java.util.List;
1715
import java.util.Set;
18-
import java.util.logging.Logger;
1916

2017
/**
2118
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
2219
* any time.
2320
*/
2421
public final class CommonConfig {
2522

26-
private static final Logger logger = Logger.getLogger(CommonConfig.class.getName());
27-
2823
private final List<String> clientRequestHeaders;
2924
private final List<String> clientResponseHeaders;
3025
private final List<String> serverRequestHeaders;
@@ -77,26 +72,15 @@ public CommonConfig(OpenTelemetry openTelemetry) {
7772
.get("client")
7873
.getBoolean("emit_experimental_telemetry/development", false);
7974

80-
Boolean oldRedact =
81-
commonConfig.get("http").get("client").getBoolean("redact_query_parameters/development");
82-
if (oldRedact != null) {
83-
logger.warning(
84-
"otel.instrumentation.http.client.experimental.redact-query-parameters is deprecated. "
85-
+ "Use otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters instead.");
86-
}
87-
List<String> newConfigValue =
75+
List<String> sensitiveQueryParameterList =
8876
generalConfig
8977
.get("sanitization")
9078
.get("url")
9179
.getScalarList("sensitive_query_parameters/development", String.class);
92-
93-
if (newConfigValue != null) {
94-
sensitiveQueryParameters = new HashSet<>(newConfigValue);
95-
} else if (oldRedact != null) {
96-
sensitiveQueryParameters = oldRedact ? HttpConstants.SENSITIVE_QUERY_PARAMETERS : emptySet();
97-
} else {
98-
sensitiveQueryParameters = HttpConstants.SENSITIVE_QUERY_PARAMETERS;
99-
}
80+
sensitiveQueryParameters =
81+
sensitiveQueryParameterList != null
82+
? new HashSet<>(sensitiveQueryParameterList)
83+
: HttpConstants.SENSITIVE_QUERY_PARAMETERS;
10084

10185
emitExperimentalHttpServerTelemetry =
10286
commonConfig

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/config/internal/DbConfig.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,6 @@ private static Boolean getCommonSqlCommenterEnabled(OpenTelemetry openTelemetry)
8585
return deprecatedValue;
8686
}
8787

88-
Boolean deprecatedPropertyValue =
89-
commonConfig.get("db_sqlcommenter/development").getBoolean("enabled");
90-
if (deprecatedPropertyValue != null) {
91-
warnIfDeprecatedExperimentalSystemPropertyUsed(
92-
"otel.instrumentation.common.experimental.db-sqlcommenter.enabled",
93-
"otel.instrumentation.common.db.experimental.sqlcommenter.enabled");
94-
return deprecatedPropertyValue;
95-
}
96-
9788
return null;
9889
}
9990

@@ -172,18 +163,6 @@ private static void warnIfDeprecatedSystemPropertyUsed(
172163
}
173164
}
174165

175-
private static void warnIfDeprecatedExperimentalSystemPropertyUsed(
176-
String deprecatedProperty, String replacementProperty) {
177-
if (warnedDeprecatedProperties.add(deprecatedProperty)) {
178-
logger.warning(
179-
"The "
180-
+ deprecatedProperty
181-
+ " system property is deprecated and will be removed in a future version. Use "
182-
+ replacementProperty
183-
+ " instead.");
184-
}
185-
}
186-
187166
private static void warnIfDeprecatedSettingOrEquivalentUsed(
188167
String deprecatedProperty, String replacementProperty) {
189168
if (warnedDeprecatedProperties.add(deprecatedProperty)) {

instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/config/internal/DbConfigTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,6 @@ void deprecatedCommonStatementSanitizerPropertyIsUsedAsFallback() {
5959
assertThat(DbConfig.isCommonQuerySanitizationEnabled(openTelemetry)).isFalse();
6060
}
6161

62-
@Test
63-
void commonSqlCommenterPropertyIsUsedAsFallback() {
64-
ExtendedOpenTelemetry openTelemetry = mock(ExtendedOpenTelemetry.class);
65-
DeclarativeConfigProperties commonConfig =
66-
mock(DeclarativeConfigProperties.class, RETURNS_DEEP_STUBS);
67-
DeclarativeConfigProperties instrumentationConfig =
68-
mock(DeclarativeConfigProperties.class, RETURNS_DEEP_STUBS);
69-
when(openTelemetry.getInstrumentationConfig("common")).thenReturn(commonConfig);
70-
when(openTelemetry.getInstrumentationConfig("jdbc")).thenReturn(instrumentationConfig);
71-
when(instrumentationConfig.get("sqlcommenter/development").getBoolean("enabled"))
72-
.thenReturn(null);
73-
when(commonConfig.get("db").get("sqlcommenter/development").getBoolean("enabled"))
74-
.thenReturn(null);
75-
when(commonConfig.get("database").get("sqlcommenter/development").getBoolean("enabled"))
76-
.thenReturn(null);
77-
when(commonConfig.get("db_sqlcommenter/development").getBoolean("enabled")).thenReturn(true);
78-
79-
assertThat(DbConfig.isSqlCommenterEnabled(openTelemetry, "jdbc")).isTrue();
80-
}
81-
8262
@Test
8363
void deprecatedCommonSqlCommenterConfigWarningUsesFutureVersionMessage() throws Exception {
8464
ExtendedOpenTelemetry openTelemetry = mock(ExtendedOpenTelemetry.class);

instrumentation/akka/akka-http-10.0/metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ configurations:
3737
`http.client.response.size` metrics.
3838
type: boolean
3939
default: false
40-
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
41-
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
42-
type: boolean
43-
default: true
4440
- name: otel.instrumentation.http.server.capture-request-headers
4541
description: List of HTTP request headers to capture in HTTP server telemetry.
4642
type: list
@@ -56,3 +52,7 @@ configurations:
5652
`http.server.response.size` metrics.
5753
type: boolean
5854
default: false
55+
- name: otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters
56+
description: List of URL query parameter names whose values are redacted in URL attributes. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
57+
type: list
58+
default: "AWSAccessKeyId,Signature,sig,X-Goog-Signature"

instrumentation/apache-httpasyncclient-4.1/metadata.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ configurations:
3030
`http.client.response.size` metrics.
3131
type: boolean
3232
default: false
33-
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
34-
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
35-
type: boolean
36-
default: true
37-
33+
- name: otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters
34+
description: List of URL query parameter names whose values are redacted in URL attributes. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
35+
type: list
36+
default: "AWSAccessKeyId,Signature,sig,X-Goog-Signature"

0 commit comments

Comments
 (0)