Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrlpld committed Sep 9, 2023
1 parent 1bb5eab commit f28df3a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lpld/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,13 @@ def traces_sampler(context: dict) -> float:
See also: https://docs.sentry.io/platforms/python/guides/django/configuration/sampling/#setting-a-sampling-function # noqa: E501
"""
if path := context["wsgi_environ"].get("PATH_INFO"):
if any((
path.startswith("/wp-"),
path.endswith(".php"),
path.endswith("wlwmanifest.xml"),
)):
if any(
(
path.startswith("/wp-"),
path.endswith(".php"),
path.endswith("wlwmanifest.xml"),
)
):
# Ignore spammy requests
return 0.0
return SENTRY_SAMPLE_RATE
Expand Down

0 comments on commit f28df3a

Please sign in to comment.