Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur authored Oct 3, 2024
1 parent 69f94ac commit 4c5c079
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ddtrace/contrib/trace_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
from ddtrace.settings import IntegrationConfig # noqa:F401


_EMPTY_STRING_PATTERN = re.compile(r"")


log = get_logger(__name__)

wrap = wrapt.wrap_function_wrapper
Expand Down Expand Up @@ -413,7 +410,7 @@ def _set_url_tag(integration_config, span, url, query):
# TODO(munir): deprecate and remove ddtrace.config.global_query_string_obfuscation_disabled,
# setting config._obfuscation_query_string_pattern to an empty string should be enough to disable obfuscation
span.set_tag_str(http.URL, url)
elif getattr(config._obfuscation_query_string_pattern, "pattern", None) == b"":
elif getattr(config._obfuscation_query_string_pattern, "pattern") == b"":
# if obfuscation is enabled but the pattern is empty, this means config.global_query_string_obfuscation_disabled
# was manually set to False, so we should strip the whole query string
span.set_tag_str(http.URL, strip_query_string(url))
Expand Down

0 comments on commit 4c5c079

Please sign in to comment.