Skip to content

Commit fbd9657

Browse files
committed
feat(sentry): upgrade SDK and add data collection config
1 parent a7c2b67 commit fbd9657

3 files changed

Lines changed: 104 additions & 104 deletions

File tree

‎cds_ils/config.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,20 @@ def query_params_modifier(extra_params):
281281
"""Enable logging of Python warnings to Sentry."""
282282
LOGGING_SENTRY_CELERY = False
283283
"""Configure Celery to send logging to Sentry."""
284+
LOGGING_SENTRY_INIT_KWARGS = {
285+
"data_collection": {"user_info": True},
286+
}
287+
"""
288+
Custom args for the Sentry SDK.
289+
290+
data_collection.user_info is True by default, but we keep this here just to be explicit and
291+
clarify what is happening. This transmits the CDS ID, email, and username of the logged-in
292+
user, as well as the real client IP address. It does not transmit additional CERN-specific
293+
data like group membership.
294+
295+
For detailed docs, see: https://docs.sentry.io/platforms/python/integrations/flask/#configure
296+
and https://docs.sentry.io/platforms/python/data-management/data-collected/#information-about-logged-in-user
297+
"""
284298
SENTRY_DSN = None
285299
"""Set SENTRY_DSN environment variable."""
286300
# Sentry uses env var SENTRY_ENVIRONMENT and SENTRY_RELEASE

‎requirements.pinned.txt‎

Lines changed: 90 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,69 @@
1-
alembic==1.16.5
2-
amqp==5.3.1
1+
alembic==1.20.1
2+
amqp==5.4.2
33
appdirs==1.4.4
44
arrow==1.4.0
55
asttokens==3.0.2
6-
async-timeout==5.0.1
76
attrs==26.1.0
87
babel==2.18.0
98
babel-edtf==1.2.2
109
base32-lib==1.1.1
11-
billiard==4.2.4
12-
bleach==6.2.0
10+
billiard==4.3.2
11+
bleach==6.4.0
1312
blinker==1.9.0
14-
cachelib==0.14.0
13+
cachelib==0.17.2
1514
cds-dojson==0.13.0
1615
celery==5.4.0
1716
certifi==2026.10.23
18-
cffi==2.0.0
17+
cffi==2.1.1
1918
charset-normalizer==3.5.2
20-
click==8.1.8
19+
click==8.5.1
2120
click-default-group==1.2.4
2221
click-didyoumean==0.3.1
2322
click-plugins==1.1.1.2
2423
click-repl==0.4.1
25-
commonmark==0.9.1
2624
counter-robots==2025.11
27-
cryptography==47.0.0
28-
dbus-python==1.2.18
29-
decorator==5.3.1
30-
Deprecated==1.3.1
25+
cryptography==50.0.2
26+
deprecated==3.0.1
3127
dictdiffer==0.10.0
32-
distlib==0.3.8
33-
dnspython==2.7.0
28+
dnspython==2.9.2
3429
dojson==1.7.1
35-
edtf==5.0.0
36-
email-validator==2.3.0
37-
Events==0.5
38-
exceptiongroup==1.3.1
30+
edtf==5.0.2
31+
email-validator==2.4.0
32+
events==0.5
3933
executing==2.3.0
40-
filelock==3.13.1
41-
Flask==3.1.3
42-
Flask-Alembic==3.1.1
34+
flask==3.1.3
35+
flask-alembic==3.1.1
4336
flask-babel==4.0.0
44-
Flask-Caching==2.3.1
45-
Flask-CeleryExt==0.5.1
46-
Flask-Collect-Invenio==1.4.1
37+
flask-caching==2.5.1
38+
flask-celeryext==0.5.1
39+
flask-collect-invenio==1.4.1
4740
flask-cors==6.0.5
48-
Flask-DebugToolbar==0.16.0
49-
Flask-KVSession-Invenio==1.0.1
50-
Flask-Limiter==3.11.0
51-
Flask-Login==0.6.3
52-
Flask-Mail==0.9.1
41+
flask-debugtoolbar==0.16.0
42+
flask-kvsession-invenio==1.0.1
43+
flask-limiter==4.1.1
44+
flask-login==0.6.3
45+
flask-mail==0.9.1
5346
flask-menu==2.0.1
54-
Flask-OAuthlib-Invenio==2.0.0
55-
Flask-Principal==0.4.0
47+
flask-oauthlib-invenio==2.0.0
48+
flask-principal==0.4.0
5649
flask-resources==1.3.1
57-
Flask-Security-Invenio==4.2.5
50+
flask-security-invenio==4.2.5
5851
flask-shell-ipython==0.5.3
59-
Flask-SQLAlchemy==3.1.1
52+
flask-sqlalchemy==3.1.1
6053
flask-talisman==0.8.1
6154
flask-webpackext==2.1.1
62-
Flask-WTF==1.2.2
55+
flask-wtf==1.3.0
6356
fs==2.4.16
6457
ftfy==6.3.1
6558
future==1.0.0
6659
fuzzywuzzy==0.18.0
67-
geojson==3.2.0
68-
github3.py==4.0.1
69-
gpg==1.15.1
70-
greenlet==3.2.5
60+
geojson==3.3.0
61+
github3-py==4.0.1
62+
greenlet==3.5.6
7163
idna==3.20
7264
idutils==1.7.2
73-
importlib_metadata==8.7.1
74-
importlib_resources==6.5.2
65+
importlib-metadata==10.2.0
66+
importlib-resources==7.1.0
7567
infinity==1.5
7668
intervals==0.9.2
7769
invenio-access==5.1.0
@@ -92,7 +84,7 @@ invenio-formatter==4.1.0
9284
invenio-i18n==3.6.0
9385
invenio-indexer==4.0.0
9486
invenio-jsonschemas==2.1.1
95-
invenio-logging==4.1.1
87+
invenio-logging==4.3.1
9688
invenio-mail==2.3.2
9789
invenio-oaiserver==4.1.0
9890
invenio-oauth2server==4.0.0
@@ -113,114 +105,109 @@ invenio-search-ui==4.3.1
113105
invenio-stats==6.2.0
114106
invenio-theme==4.9.0
115107
invenio-userprofiles==5.1.0
116-
ipython==8.18.1
117-
ipython_pygments_lexers==1.1.1
118-
isbnlib2==3.11.7
108+
ipython==9.18.1
109+
ipython-pygments-lexers==1.1.1
110+
isbnlib2==3.11.26
119111
itsdangerous==2.2.0
120-
jedi==0.19.2
121-
Jinja2==3.1.6
112+
jedi==0.20.1
113+
jinja2==3.1.6
122114
jsmin==3.0.1
123-
jsonpatch==1.33
124-
jsonpointer==3.0.0
115+
jsonpatch==1.48
116+
jsonpointer==3.12
125117
jsonref==1.1.0
126118
jsonresolver==0.5.2
127-
jsonschema==4.25.1
119+
jsonschema==4.26.0
128120
jsonschema-specifications==2025.9.1
129-
kombu==5.6.2
130-
libcomps==0.1.18
121+
kombu==5.7.0
122+
lazy-importer==0.1.0
131123
libpass==1.9.4
132-
limits==4.2
124+
limits==5.8.0
133125
lorem==0.1.1
134126
luqum==1.0.0
135127
lxml==6.1.3
136-
Mako==1.3.12
137-
markdown-it-py==3.0.0
138-
MarkupSafe==3.0.4
128+
mako==1.4.3
129+
markdown-it-py==4.3.0
130+
markupsafe==3.0.4
139131
marshmallow==3.26.2
140132
marshmallow-oneofschema==3.2.0
141133
marshmallow-utils==0.15.4
142134
matplotlib-inline==0.2.2
143-
maxminddb==2.8.2
135+
maxminddb==3.3.0
144136
maxminddb-geolite2==2018.703
145137
mdurl==0.1.2
146-
msgpack==1.1.2
138+
msgpack==1.2.4
147139
oauthlib==4.0.1
148140
opensearch-dsl==2.1.0
149141
opensearch-py==2.8.0
150142
ordered-set==4.1.0
151143
ordereddict==1.1
152-
packaging==24.2
144+
packaging==26.3
153145
parso==0.8.7
154-
passlib==1.7.4
155146
pexpect==4.9.0
156-
pillow==11.3.0
157-
platformdirs==4.4.0
158-
pluggy==1.6.0
147+
pillow==13.0.0
148+
pluggy==1.7.0
159149
ply==3.11
160150
polib==1.2.0
161-
prompt_toolkit==3.0.52
151+
prompt-toolkit==3.0.53
162152
psutil==7.2.2
163-
psycopg2-binary==2.9.12
153+
psycopg2-binary==2.9.13
164154
ptyprocess==0.7.0
165-
pure_eval==0.2.4
155+
pure-eval==0.2.4
166156
pyasn1==0.6.5
167-
pyasn1_modules==0.4.2
157+
pyasn1-modules==0.4.2
168158
pycountry==24.6.1
169-
pycparser==2.23
170-
Pygments==2.21.0
171-
PyJWT==2.15.1
172-
PyMySQL==1.2.4
159+
pycparser==3.12
160+
pygments==2.21.0
161+
pyjwt==2.15.1
162+
pymysql==1.2.4
173163
pynpm==0.3.2
174164
pyparsing==3.3.3
175-
pyPEG2==2.15.2
176-
python-dateutil==2.9.0.post0
165+
pypeg2==2.15.2
166+
python-dateutil==4.0.0
177167
python-geoip==1.2
178168
python-ldap==3.4.8
179169
pytz==2024.1
180170
pywebpack==2.4.0
181-
PyYAML==6.0.3
182-
redis==7.0.1
183-
referencing==0.36.2
184-
requests==2.32.5
171+
pyyaml==6.0.3
172+
redis==8.1.0
173+
referencing==0.37.0
174+
requests==2.34.2
185175
requests-oauthlib==2.0.0
186-
rich==13.9.4
176+
rich==15.0.0
187177
rich-click==1.9.9
188-
rpds-py==0.27.1
189-
rpm==4.16.1.3
190-
sentry-sdk==1.45.1
178+
rpds-py==2026.9.1
179+
sentry-sdk==2.75.0
180+
setuptools==84.2.1
191181
simplejson==3.20.2
192182
simplekv==0.14.1
193183
six==1.17.0
194184
speaklater==1.3
195-
SQLAlchemy==2.0.58
196-
SQLAlchemy-Continuum==1.5.2
197-
SQLAlchemy-Utils==0.41.2
185+
sqlalchemy==2.0.58
186+
sqlalchemy-continuum==1.5.2
187+
sqlalchemy-utils==0.41.2
198188
stack-data==0.6.3
199-
systemd-python==234
200-
tinycss2==1.4.0
201-
tomli==2.4.1
202-
traitlets==5.15.1
203-
typing_extensions==4.16.0
189+
tinycss2==1.5.1
190+
traitlets==5.16.1
191+
typing-extensions==4.16.0
204192
tzdata==2026.6
205-
ua-parser==1.0.1
206-
ua-parser-builtins==0.18.0.post1
193+
ua-parser==1.0.2
194+
ua-parser-builtins==202610
207195
uritemplate==4.2.0
208-
uritools==5.0.0
209-
urllib3==1.26.20
210-
validators==0.35.0
196+
uritools==7.0.1
197+
urllib3==2.8.0
198+
validators==0.36.0
211199
vine==5.1.0
212-
virtualenv==20.25.1
213-
Wand==0.6.13
214-
watchdog==6.0.0
200+
wand==0.6.13
201+
watchdog==7.1.0
215202
wcwidth==0.9.4
216203
webargs==8.7.1
217-
webencodings==0.5.1
218-
Werkzeug==3.1.9
204+
webencodings==0.6.1
205+
werkzeug==3.1.9
219206
wrapt==2.5.2
220-
WTForms==3.2.1
221-
WTForms-Alchemy==0.19.1
222-
WTForms-Components==0.11.0
207+
wtforms==3.3.2
208+
wtforms-alchemy==0.19.1
209+
wtforms-components==0.12.0
223210
xmltodict==0.12.0
224-
zipp==3.23.1
211+
zipp==4.1.2
225212
zipstream-ng==1.9.3
226213
zxcvbn==4.5.0

‎setup.cfg‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ install_requires =
2828
fuzzywuzzy>=0.18.0
2929
python-ldap>=3.4.0,<3.5.0
3030
invenio-app-ils[lorem,opensearch2]>=9.0.0,<10.0.0
31-
sentry-sdk>=1.45,<2.0.0
3231
# invenio-xrootd requires it
3332
fs>=2.0.10,<3.0
3433
# migrator deps

0 commit comments

Comments
 (0)