structguru 1.2.1__tar.gz → 1.2.2__tar.gz
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.
- {structguru-1.2.1 → structguru-1.2.2}/Cargo.lock +6 -61
- {structguru-1.2.1 → structguru-1.2.2}/Cargo.toml +5 -8
- {structguru-1.2.1 → structguru-1.2.2}/PKG-INFO +1 -1
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/Cargo.toml +1 -1
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/src/filter.rs +1 -3
- {structguru-1.2.1 → structguru-1.2.2}/pyproject.toml +1 -1
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/__init__.py +1 -1
- {structguru-1.2.1 → structguru-1.2.2}/LICENSE +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/README.md +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/src/clock.rs +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/src/lib.rs +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/src/render.rs +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/src/value.rs +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-core/src/worker.rs +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-py/Cargo.toml +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/crates/structguru-py/src/lib.rs +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/_contextvars.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/_native_dispatch.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/_native_env.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/_runtime.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/config.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/core.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/exceptions.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/__init__.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/_stdlib_env.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/_util.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/asgi.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/celery.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/django.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/flask.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/grpc.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/httpx.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/requests.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/sentry.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/sqlalchemy.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/integrations/stdlib.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/metrics.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/otel.py +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/py.typed +0 -0
- {structguru-1.2.1 → structguru-1.2.2}/src/structguru/redaction.py +0 -0
|
@@ -26,32 +26,6 @@ version = "0.8.0"
|
|
|
26
26
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
27
|
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
|
|
28
28
|
|
|
29
|
-
[[package]]
|
|
30
|
-
name = "cfg-if"
|
|
31
|
-
version = "1.0.4"
|
|
32
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
-
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
34
|
-
|
|
35
|
-
[[package]]
|
|
36
|
-
name = "chacha20"
|
|
37
|
-
version = "0.10.2"
|
|
38
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
-
checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
|
|
40
|
-
dependencies = [
|
|
41
|
-
"cfg-if",
|
|
42
|
-
"cpufeatures",
|
|
43
|
-
"rand_core",
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
[[package]]
|
|
47
|
-
name = "cpufeatures"
|
|
48
|
-
version = "0.3.0"
|
|
49
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
50
|
-
checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
|
|
51
|
-
dependencies = [
|
|
52
|
-
"libc",
|
|
53
|
-
]
|
|
54
|
-
|
|
55
29
|
[[package]]
|
|
56
30
|
name = "deranged"
|
|
57
31
|
version = "0.5.8"
|
|
@@ -70,16 +44,10 @@ dependencies = [
|
|
|
70
44
|
]
|
|
71
45
|
|
|
72
46
|
[[package]]
|
|
73
|
-
name = "
|
|
74
|
-
version = "
|
|
47
|
+
name = "fastrand"
|
|
48
|
+
version = "2.5.0"
|
|
75
49
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
-
checksum = "
|
|
77
|
-
dependencies = [
|
|
78
|
-
"cfg-if",
|
|
79
|
-
"libc",
|
|
80
|
-
"r-efi",
|
|
81
|
-
"rand_core",
|
|
82
|
-
]
|
|
50
|
+
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
83
51
|
|
|
84
52
|
[[package]]
|
|
85
53
|
name = "heck"
|
|
@@ -204,29 +172,6 @@ dependencies = [
|
|
|
204
172
|
"proc-macro2",
|
|
205
173
|
]
|
|
206
174
|
|
|
207
|
-
[[package]]
|
|
208
|
-
name = "r-efi"
|
|
209
|
-
version = "6.0.0"
|
|
210
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
-
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
212
|
-
|
|
213
|
-
[[package]]
|
|
214
|
-
name = "rand"
|
|
215
|
-
version = "0.10.2"
|
|
216
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
-
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
|
218
|
-
dependencies = [
|
|
219
|
-
"chacha20",
|
|
220
|
-
"getrandom",
|
|
221
|
-
"rand_core",
|
|
222
|
-
]
|
|
223
|
-
|
|
224
|
-
[[package]]
|
|
225
|
-
name = "rand_core"
|
|
226
|
-
version = "0.10.1"
|
|
227
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
228
|
-
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
|
229
|
-
|
|
230
175
|
[[package]]
|
|
231
176
|
name = "regex"
|
|
232
177
|
version = "1.13.1"
|
|
@@ -300,10 +245,10 @@ dependencies = [
|
|
|
300
245
|
|
|
301
246
|
[[package]]
|
|
302
247
|
name = "structguru-core"
|
|
303
|
-
version = "1.2.
|
|
248
|
+
version = "1.2.2"
|
|
304
249
|
dependencies = [
|
|
305
250
|
"fancy-regex",
|
|
306
|
-
"
|
|
251
|
+
"fastrand",
|
|
307
252
|
"regex",
|
|
308
253
|
"serde",
|
|
309
254
|
"serde_json",
|
|
@@ -312,7 +257,7 @@ dependencies = [
|
|
|
312
257
|
|
|
313
258
|
[[package]]
|
|
314
259
|
name = "structguru-py"
|
|
315
|
-
version = "1.2.
|
|
260
|
+
version = "1.2.2"
|
|
316
261
|
dependencies = [
|
|
317
262
|
"pyo3",
|
|
318
263
|
"regex",
|
|
@@ -3,7 +3,7 @@ members = ["crates/structguru-core", "crates/structguru-py"]
|
|
|
3
3
|
resolver = "2"
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "1.2.
|
|
6
|
+
version = "1.2.2"
|
|
7
7
|
edition = "2024"
|
|
8
8
|
rust-version = "1.89"
|
|
9
9
|
license = "MIT"
|
|
@@ -35,11 +35,8 @@ regex = { version = "1", default-features = false, features = ["std", "unicode"]
|
|
|
35
35
|
# Backtracking engine for opt-in look-around/backreference redaction patterns
|
|
36
36
|
# (`allow_backtracking_patterns=True`); never used unless explicitly requested.
|
|
37
37
|
fancy-regex = { version = "0.19", default-features = false, features = ["std", "unicode"] }
|
|
38
|
-
# Only `
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"std_rng",
|
|
43
|
-
"thread_rng",
|
|
44
|
-
] }
|
|
38
|
+
# Only a per-thread `f64` draw is needed (sampling filter). fastrand's WyRand
|
|
39
|
+
# generator has no transitive dependencies on the wheel targets, unlike rand's
|
|
40
|
+
# ChaCha-based thread RNG.
|
|
41
|
+
fastrand = { version = "2.5" }
|
|
45
42
|
structguru-core = { path = "crates/structguru-core" }
|
|
@@ -8,8 +8,6 @@ use std::collections::{HashMap, VecDeque};
|
|
|
8
8
|
use std::sync::Mutex;
|
|
9
9
|
use std::time::{Duration, Instant};
|
|
10
10
|
|
|
11
|
-
use rand::random;
|
|
12
|
-
|
|
13
11
|
/// Outcome of a pre-render filter check.
|
|
14
12
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
15
13
|
pub enum Decision {
|
|
@@ -71,7 +69,7 @@ impl RecordFilter for Sampler {
|
|
|
71
69
|
if self.rate <= 0.0 {
|
|
72
70
|
return Decision::Drop;
|
|
73
71
|
}
|
|
74
|
-
if
|
|
72
|
+
if fastrand::f64() < self.rate {
|
|
75
73
|
Decision::Keep
|
|
76
74
|
} else {
|
|
77
75
|
Decision::Drop
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|