sentry-relay 0.8.58__zip → 0.8.59__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.59}/PKG-INFO +1 -1
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/rustsrc.zip +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/processing.py +29 -0
- sentry-relay-0.8.59/version.txt +1 -0
- sentry-relay-0.8.58/version.txt +0 -1
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/README +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/__init__.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/auth.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/consts.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/exceptions.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/py.typed +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/sentry_relay/utils.py +0 -0
- {sentry-relay-0.8.58 → sentry-relay-0.8.59}/setup.py +0 -0
|
Binary file
|
|
@@ -31,6 +31,7 @@ __all__ = [
|
|
|
31
31
|
"validate_sampling_condition",
|
|
32
32
|
"validate_sampling_configuration",
|
|
33
33
|
"validate_project_config",
|
|
34
|
+
"normalize_cardinality_limit_config",
|
|
34
35
|
"normalize_global_config",
|
|
35
36
|
]
|
|
36
37
|
|
|
@@ -309,6 +310,34 @@ def validate_project_config(config, strict: bool):
|
|
|
309
310
|
raise ValueError(error)
|
|
310
311
|
|
|
311
312
|
|
|
313
|
+
def normalize_cardinality_limit_config(
|
|
314
|
+
config,
|
|
315
|
+
json_dumps: Callable[[Any], Any] = json.dumps,
|
|
316
|
+
json_loads: Callable[[str | bytes], Any] = json.loads,
|
|
317
|
+
):
|
|
318
|
+
"""Normalize the cardinality limit config.
|
|
319
|
+
|
|
320
|
+
Normalization consists of deserializing and serializing back the given
|
|
321
|
+
cardinality limit config. If deserializing fails, throw an exception. Note that even if
|
|
322
|
+
the roundtrip doesn't produce errors, the given config may differ from
|
|
323
|
+
normalized one.
|
|
324
|
+
|
|
325
|
+
:param config: the cardinality limit config to validate.
|
|
326
|
+
:param json_dumps: a function that stringifies python objects
|
|
327
|
+
:param json_loads: a function that parses and converts JSON strings
|
|
328
|
+
"""
|
|
329
|
+
serialized = json_dumps(config)
|
|
330
|
+
normalized = rustcall(
|
|
331
|
+
lib.normalize_cardinality_limit_config, encode_str(serialized)
|
|
332
|
+
)
|
|
333
|
+
rv = decode_str(normalized, free=True)
|
|
334
|
+
try:
|
|
335
|
+
return json_loads(rv)
|
|
336
|
+
except Exception:
|
|
337
|
+
# Catch all errors since json.loads implementation can change.
|
|
338
|
+
raise ValueError(rv)
|
|
339
|
+
|
|
340
|
+
|
|
312
341
|
def normalize_global_config(
|
|
313
342
|
config,
|
|
314
343
|
json_dumps: Callable[[Any], Any] = json.dumps,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.8.59
|
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
|