Skip to content

Commit

Permalink
Release 2023.04.1 (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Apr 4, 2023
2 parents d48a448 + ee28110 commit 8740b19
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion appcontainer/requirements.txt
Expand Up @@ -3,5 +3,5 @@ Django==4.1.7
django-csp==3.7
eligibility-api==2023.01.1
requests==2.28.2
sentry-sdk==1.17.0
sentry-sdk==1.18.0
six==1.16.0
2 changes: 1 addition & 1 deletion benefits/__init__.py
@@ -1,3 +1,3 @@
__version__ = "2023.03.2"
__version__ = "2023.04.1"

VERSION = __version__
19 changes: 16 additions & 3 deletions benefits/sentry.py
@@ -1,10 +1,13 @@
from benefits import VERSION
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
import shutil
import os
import subprocess

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.scrubber import EventScrubber, DEFAULT_DENYLIST

from benefits import VERSION


SENTRY_ENVIRONMENT = os.environ.get("SENTRY_ENVIRONMENT", "local")

Expand Down Expand Up @@ -52,6 +55,12 @@ def get_release() -> str:
return VERSION


def get_denylist():
# custom denylist
denylist = DEFAULT_DENYLIST + ["sub", "name"]
return denylist


def configure():
SENTRY_DSN = os.environ.get("SENTRY_DSN")
if SENTRY_DSN:
Expand All @@ -68,6 +77,10 @@ def configure():
environment=SENTRY_ENVIRONMENT,
release=release,
in_app_include=["benefits"],
# send_default_pii must be False (the default) for a custom EventScrubber/denylist
# https://docs.sentry.io/platforms/python/data-management/sensitive-data/#event_scrubber
send_default_pii=False,
event_scrubber=EventScrubber(denylist=get_denylist()),
)
else:
print("SENTRY_DSN not set, so won't send events")
12 changes: 10 additions & 2 deletions benefits/settings.py
Expand Up @@ -311,6 +311,14 @@ def _filter_empty(ls):
# Configuration for requests
# https://requests.readthedocs.io/en/latest/user/advanced/#timeouts

REQUESTS_CONNECT_TIMEOUT = os.environ.get("REQUESTS_CONNECT_TIMEOUT", 3)
REQUESTS_READ_TIMEOUT = os.environ.get("REQUESTS_READ_TIMEOUT", 1)
try:
REQUESTS_CONNECT_TIMEOUT = int(os.environ.get("REQUESTS_CONNECT_TIMEOUT"))
except Exception:
REQUESTS_CONNECT_TIMEOUT = 3

try:
REQUESTS_READ_TIMEOUT = int(os.environ.get("REQUESTS_READ_TIMEOUT"))
except Exception:
REQUESTS_READ_TIMEOUT = 20

REQUESTS_TIMEOUT = (REQUESTS_CONNECT_TIMEOUT, REQUESTS_READ_TIMEOUT)
14 changes: 7 additions & 7 deletions tests/cypress/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/cypress/package.json
Expand Up @@ -12,6 +12,6 @@
"license": "AGPL-3.0-or-later",
"private": true,
"devDependencies": {
"cypress": "^12.8.1"
"cypress": "^12.9.0"
}
}

0 comments on commit 8740b19

Please sign in to comment.