From 990b90f2ac883182c469822cb8c1272ad8687683 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:56:19 +0000 Subject: [PATCH] ref(tracing): Remove unused get_url_attributes_legacy Co-Authored-By: Ivana Kellyer --- sentry_sdk/tracing_utils.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/sentry_sdk/tracing_utils.py b/sentry_sdk/tracing_utils.py index e9f1667536..1f64e471c0 100644 --- a/sentry_sdk/tracing_utils.py +++ b/sentry_sdk/tracing_utils.py @@ -166,39 +166,6 @@ def add_http_breadcrumb(status_code: "Optional[int]", data: "dict[str, Any]") -> sentry_sdk.add_breadcrumb(**kwargs) -def get_url_attributes_legacy( - client: "sentry_sdk.client.BaseClient", - parsed_url: "Optional[ParsedUrl]", -) -> "Attributes": - """Build the `url.*` span attributes for an outgoing HTTP request. - - The query string is filtered according to `data_collection`. - """ - attributes: "Attributes" = {} - if parsed_url is None: - return attributes - - query: "Optional[str]" = None - if parsed_url.query: - query = _apply_data_collection_filtering_to_query_string( - query_string=parsed_url.query, - behaviour=client.options["data_collection"]["url_query_params"], - ) - - url_full = parsed_url.url - if query: - attributes[SPANDATA.URL_QUERY] = query - url_full += "?" + query - - if parsed_url.fragment: - attributes[SPANDATA.URL_FRAGMENT] = parsed_url.fragment - url_full += "#" + parsed_url.fragment - - attributes[SPANDATA.URL_FULL] = url_full - - return attributes - - def get_url_attributes( client: "sentry_sdk.client.BaseClient", parsed_url: "Optional[ParsedUrl]",