Skip to content

Commit 11e4cc0

Browse files
adinauerclaude
andcommitted
ref(http): Use URL query parameter option name
Update URL filtering and integration coverage to consume the renamed canonical Data Collection option. Refs #5666 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e104fe1 commit 11e4cc0

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

sentry-opentelemetry/sentry-opentelemetry-core/src/test/kotlin/OpenTelemetryAttributesExtractorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class OpenTelemetryAttributesExtractorTest {
7070

7171
@Test
7272
fun `data collection can disable URL query attributes`() {
73-
fixture.options.dataCollection.queryParams = KeyValueCollectionBehavior.off()
73+
fixture.options.dataCollection.urlQueryParams = KeyValueCollectionBehavior.off()
7474
givenAttributes(
7575
mapOf(
7676
HttpAttributes.HTTP_REQUEST_METHOD to "GET",

sentry-servlet/src/test/kotlin/io/sentry/servlet/SentryRequestHttpServletRequestProcessorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SentryRequestHttpServletRequestProcessorTest {
5757
MockMvcRequestBuilders.get(URI.create("http://example.com?name=value"))
5858
.buildRequest(MockServletContext())
5959
val options =
60-
SentryOptions().also { it.dataCollection.queryParams = KeyValueCollectionBehavior.off() }
60+
SentryOptions().also { it.dataCollection.urlQueryParams = KeyValueCollectionBehavior.off() }
6161
val event = SentryEvent()
6262

6363
SentryRequestHttpServletRequestProcessor(request, options).process(event, Hint())

sentry/src/main/java/io/sentry/util/UrlUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class UrlUtils {
5050
public static @Nullable String filterQueryParams(
5151
final @Nullable String query, final @NotNull DataCollectionResolver resolver) {
5252
return resolver.isDataCollectionConfigured()
53-
? HttpUtils.filterQueryParams(query, resolver.getQueryParams())
53+
? HttpUtils.filterQueryParams(query, resolver.getUrlQueryParams())
5454
: query;
5555
}
5656

sentry/src/test/java/io/sentry/util/UrlUtilsTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class UrlUtilsTest {
5454
@Test
5555
fun `resolver aware helpers remove query values in off mode`() {
5656
val options =
57-
SentryOptions().also { it.dataCollection.queryParams = KeyValueCollectionBehavior.off() }
57+
SentryOptions().also { it.dataCollection.urlQueryParams = KeyValueCollectionBehavior.off() }
5858
val details = UrlUtils.parse("https://example.com?name=value", options.dataCollectionResolver)
5959
val request = Request()
6060
val breadcrumb =

0 commit comments

Comments
 (0)