sentry-relay 0.8.58__zip → 0.8.60__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/PKG-INFO +1 -1
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/rustsrc.zip +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/processing.py +48 -10
- sentry-relay-0.8.60/version.txt +1 -0
- sentry-relay-0.8.58/version.txt +0 -1
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/README +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/__init__.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/auth.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/consts.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/exceptions.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/py.typed +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/sentry_relay/utils.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.60}/setup.py +0 -0
|
Binary file
|
|
@@ -30,7 +30,8 @@ __all__ = [
|
|
|
30
30
|
"validate_rule_condition",
|
|
31
31
|
"validate_sampling_condition",
|
|
32
32
|
"validate_sampling_configuration",
|
|
33
|
-
"
|
|
33
|
+
"normalize_project_config",
|
|
34
|
+
"normalize_cardinality_limit_config",
|
|
34
35
|
"normalize_global_config",
|
|
35
36
|
]
|
|
36
37
|
|
|
@@ -297,16 +298,53 @@ def validate_sampling_configuration(condition):
|
|
|
297
298
|
raise ValueError(error)
|
|
298
299
|
|
|
299
300
|
|
|
300
|
-
def
|
|
301
|
-
|
|
301
|
+
def normalize_project_config(
|
|
302
|
+
config,
|
|
303
|
+
json_dumps: Callable[[Any], Any] = json.dumps,
|
|
304
|
+
json_loads: Callable[[str | bytes], Any] = json.loads,
|
|
305
|
+
):
|
|
306
|
+
"""Normalize a project config.
|
|
302
307
|
|
|
303
|
-
:param
|
|
308
|
+
:param config: the project config to validate.
|
|
309
|
+
:param json_dumps: a function that stringifies python objects
|
|
310
|
+
:param json_loads: a function that parses and converts JSON strings
|
|
304
311
|
"""
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
312
|
+
serialized = json_dumps(config)
|
|
313
|
+
normalized = rustcall(lib.relay_normalize_project_config, encode_str(serialized))
|
|
314
|
+
rv = decode_str(normalized, free=True)
|
|
315
|
+
try:
|
|
316
|
+
return json_loads(rv)
|
|
317
|
+
except Exception:
|
|
318
|
+
# Catch all errors since json.loads implementation can change.
|
|
319
|
+
raise ValueError(rv)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
def normalize_cardinality_limit_config(
|
|
323
|
+
config,
|
|
324
|
+
json_dumps: Callable[[Any], Any] = json.dumps,
|
|
325
|
+
json_loads: Callable[[str | bytes], Any] = json.loads,
|
|
326
|
+
):
|
|
327
|
+
"""Normalize the cardinality limit config.
|
|
328
|
+
|
|
329
|
+
Normalization consists of deserializing and serializing back the given
|
|
330
|
+
cardinality limit config. If deserializing fails, throw an exception. Note that even if
|
|
331
|
+
the roundtrip doesn't produce errors, the given config may differ from
|
|
332
|
+
normalized one.
|
|
333
|
+
|
|
334
|
+
:param config: the cardinality limit config to validate.
|
|
335
|
+
:param json_dumps: a function that stringifies python objects
|
|
336
|
+
:param json_loads: a function that parses and converts JSON strings
|
|
337
|
+
"""
|
|
338
|
+
serialized = json_dumps(config)
|
|
339
|
+
normalized = rustcall(
|
|
340
|
+
lib.normalize_cardinality_limit_config, encode_str(serialized)
|
|
341
|
+
)
|
|
342
|
+
rv = decode_str(normalized, free=True)
|
|
343
|
+
try:
|
|
344
|
+
return json_loads(rv)
|
|
345
|
+
except Exception:
|
|
346
|
+
# Catch all errors since json.loads implementation can change.
|
|
347
|
+
raise ValueError(rv)
|
|
310
348
|
|
|
311
349
|
|
|
312
350
|
def normalize_global_config(
|
|
@@ -326,7 +364,7 @@ def normalize_global_config(
|
|
|
326
364
|
:param json_loads: a function that parses and converts JSON strings
|
|
327
365
|
"""
|
|
328
366
|
serialized = json_dumps(config)
|
|
329
|
-
normalized = rustcall(lib.
|
|
367
|
+
normalized = rustcall(lib.relay_normalize_global_config, encode_str(serialized))
|
|
330
368
|
rv = decode_str(normalized, free=True)
|
|
331
369
|
try:
|
|
332
370
|
return json_loads(rv)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.8.60
|
sentry-relay-0.8.58/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.8.58
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|