1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
certifi,
urllib3,
# optional-dependencies
aiohttp,
anthropic,
apache-beam,
asttokens,
asyncpg,
blinker,
bottle,
celery,
celery-redbeat,
chalice,
clickhouse-driver,
django,
executing,
falcon,
fastapi,
flask,
grpcio,
httpcore,
httpx,
huey,
huggingface-hub,
langchain,
litestar,
loguru,
markupsafe,
openai,
protobuf,
pure-eval,
pymongo,
pyspark,
quart,
rq,
sanic,
sqlalchemy,
starlette,
tiktoken,
tornado,
# checks
brotli,
jsonschema,
pip,
pyrsistent,
pysocks,
pytest-asyncio,
pytestCheckHook,
pytest-forked,
pytest-localserver,
pytest-xdist,
pytest-watch,
responses,
stdenv,
}:
buildPythonPackage rec {
pname = "sentry-sdk";
version = "2.25.0";
pyproject = true;
src = fetchFromGitHub {
owner = "getsentry";
repo = "sentry-python";
tag = version;
hash = "sha256-HQxZczpfTURbkLaWjOqnYB86UuFHD71kE7HPPjlkUqc=";
};
postPatch = ''
sed -i "/addopts =/d" pyproject.toml
'';
build-system = [
setuptools
];
dependencies = [
certifi
urllib3
];
optional-dependencies = {
aiohttp = [ aiohttp ];
anthropic = [ anthropic ];
# TODO: arq
asyncpg = [ asyncpg ];
beam = [ apache-beam ];
bottle = [ bottle ];
celery = [ celery ];
celery-redbeat = [ celery-redbeat ];
chalice = [ chalice ];
clickhouse-driver = [ clickhouse-driver ];
django = [ django ];
falcon = [ falcon ];
fastapi = [ fastapi ];
flask = [
blinker
flask
markupsafe
];
grpcio = [
grpcio
protobuf
];
http2 = [ httpcore ] ++ httpcore.optional-dependencies.http2;
httpx = [ httpx ];
huey = [ huey ];
huggingface-hub = [ huggingface-hub ];
langchain = [ langchain ];
# TODO: launchdarkly
litestar = [ litestar ];
loguru = [ loguru ];
openai = [
openai
tiktoken
];
# TODO: openfeature
# TODO: opentelemetry
# TODO: opentelemetry-experimental
pure_eval = [
asttokens
executing
pure-eval
];
pymongo = [ pymongo ];
pyspark = [ pyspark ];
quart = [
blinker
quart
];
rq = [ rq ];
sanic = [ sanic ];
sqlalchemy = [ sqlalchemy ];
starlette = [ starlette ];
# TODO: starlite
# TODO: statsig
tornado = [ tornado ];
# TODO: unleash
};
nativeCheckInputs = [
brotli
pyrsistent
responses
pysocks
setuptools
executing
jsonschema
pip
pytest-asyncio
pytest-forked
pytest-localserver
pytest-xdist
pytest-watch
pytestCheckHook
] ++ optional-dependencies.http2;
__darwinAllowLocalNetworking = true;
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# darwin: 'profiler should not be running'
"tests/profiler/test_continuous_profiler.py"
];
disabledTests = [
# depends on git revision
"test_default_release"
# tries to pip install old setuptools version
"test_error_has_existing_trace_context_performance_disabled"
"test_error_has_existing_trace_context_performance_enabled"
"test_error_has_new_trace_context_performance_disabled"
"test_error_has_new_trace_context_performance_enabled"
"test_traces_sampler_gets_correct_values_in_sampling_context"
"test_performance_error"
"test_performance_no_error"
"test_timeout_error"
"test_handled_exception"
"test_unhandled_exception"
# network access
"test_create_connection_trace"
"test_crumb_capture"
"test_getaddrinfo_trace"
"test_omit_url_data_if_parsing_fails"
"test_span_origin"
# AttributeError: type object 'ABCMeta' has no attribute 'setup_once'
"test_ensure_integration_enabled_async_no_original_function_enabled"
"test_ensure_integration_enabled_no_original_function_enabled"
# sess = envelopes[1]
# IndexError: list index out of range
"test_session_mode_defaults_to_request_mode_in_wsgi_handler"
# assert count_item_types["sessions"] == 1
# assert 0 == 1
"test_auto_session_tracking_with_aggregates"
# timing sensitive
"test_profile_captured"
"test_continuous_profiler_manual_start_and_stop"
# assert ('socks' in "<class 'httpcore.connectionpool'>") == True
"test_socks_proxy"
# requires socksio to mock, but that crashes pytest-forked
"test_http_timeout"
# KeyError: 'sentry.release'
"test_logs_attributes"
];
pythonImportsCheck = [ "sentry_sdk" ];
meta = with lib; {
description = "Official Python SDK for Sentry.io";
homepage = "https://github.com/getsentry/sentry-python";
changelog = "https://github.com/getsentry/sentry-python/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}
|