Skip to content

Commit 1bb3f7b

Browse files
spacebear21benalleng
authored andcommitted
Update opentelemetry to 0.32
This addresses a Dependabot report about unbounded memory allocation GHSA-w9wp-h8wv-79jx
1 parent 00a9783 commit 1bb3f7b

4 files changed

Lines changed: 52 additions & 107 deletions

File tree

Cargo-minimal.lock

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,9 +2589,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
25892589

25902590
[[package]]
25912591
name = "opentelemetry"
2592-
version = "0.31.0"
2592+
version = "0.32.0"
25932593
source = "registry+https://github.com/rust-lang/crates.io-index"
2594-
checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0"
2594+
checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682"
25952595
dependencies = [
25962596
"futures-core",
25972597
"futures-sink",
@@ -2603,62 +2603,57 @@ dependencies = [
26032603

26042604
[[package]]
26052605
name = "opentelemetry-http"
2606-
version = "0.31.0"
2606+
version = "0.32.0"
26072607
source = "registry+https://github.com/rust-lang/crates.io-index"
2608-
checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d"
2608+
checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331"
26092609
dependencies = [
26102610
"async-trait",
26112611
"bytes",
26122612
"http",
26132613
"opentelemetry",
2614-
"reqwest",
26152614
]
26162615

26172616
[[package]]
26182617
name = "opentelemetry-otlp"
2619-
version = "0.31.0"
2618+
version = "0.32.0"
26202619
source = "registry+https://github.com/rust-lang/crates.io-index"
2621-
checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf"
2620+
checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35"
26222621
dependencies = [
26232622
"http",
26242623
"opentelemetry",
26252624
"opentelemetry-http",
26262625
"opentelemetry-proto",
26272626
"opentelemetry_sdk",
26282627
"prost",
2629-
"reqwest",
26302628
"thiserror 2.0.18",
2631-
"tracing",
26322629
]
26332630

26342631
[[package]]
26352632
name = "opentelemetry-proto"
2636-
version = "0.31.0"
2633+
version = "0.32.0"
26372634
source = "registry+https://github.com/rust-lang/crates.io-index"
2638-
checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f"
2635+
checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638"
26392636
dependencies = [
26402637
"opentelemetry",
26412638
"opentelemetry_sdk",
26422639
"prost",
2643-
"tonic",
2644-
"tonic-prost",
26452640
]
26462641

26472642
[[package]]
26482643
name = "opentelemetry_sdk"
2649-
version = "0.31.0"
2644+
version = "0.32.0"
26502645
source = "registry+https://github.com/rust-lang/crates.io-index"
2651-
checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd"
2646+
checksum = "368afaed344110f40b179bb8fbe54bc52d98f9bd2b281799ef32487c2650c956"
26522647
dependencies = [
26532648
"futures-channel",
26542649
"futures-executor",
26552650
"futures-util",
26562651
"opentelemetry",
26572652
"percent-encoding",
2653+
"portable-atomic",
26582654
"rand 0.9.0",
26592655
"thiserror 2.0.18",
26602656
"tokio",
2661-
"tokio-stream",
26622657
]
26632658

26642659
[[package]]
@@ -2867,6 +2862,7 @@ dependencies = [
28672862
"ipnet",
28682863
"maxminddb",
28692864
"mockito",
2865+
"once_cell",
28702866
"opentelemetry",
28712867
"opentelemetry-otlp",
28722868
"opentelemetry_sdk",
@@ -3059,6 +3055,12 @@ dependencies = [
30593055
"universal-hash 0.4.0",
30603056
]
30613057

3058+
[[package]]
3059+
name = "portable-atomic"
3060+
version = "1.0.0"
3061+
source = "registry+https://github.com/rust-lang/crates.io-index"
3062+
checksum = "5c451f4df4647bb419f57e4849a6366f63d56c56f0472da09835273f3ede2260"
3063+
30623064
[[package]]
30633065
name = "powerfmt"
30643066
version = "0.2.0"
@@ -3387,9 +3389,7 @@ checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb"
33873389
dependencies = [
33883390
"base64 0.22.1",
33893391
"bytes",
3390-
"futures-channel",
33913392
"futures-core",
3392-
"futures-util",
33933393
"http",
33943394
"http-body",
33953395
"http-body-util",
@@ -4114,9 +4114,9 @@ dependencies = [
41144114

41154115
[[package]]
41164116
name = "sync_wrapper"
4117-
version = "1.0.2"
4117+
version = "1.0.0"
41184118
source = "registry+https://github.com/rust-lang/crates.io-index"
4119-
checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
4119+
checksum = "384595c11a4e2969895cad5a8c4029115f5ab956a9e5ef4de79d11a426e5f20c"
41204120
dependencies = [
41214121
"futures-core",
41224122
]
@@ -4507,38 +4507,6 @@ dependencies = [
45074507
"winnow 0.7.13",
45084508
]
45094509

4510-
[[package]]
4511-
name = "tonic"
4512-
version = "0.14.1"
4513-
source = "registry+https://github.com/rust-lang/crates.io-index"
4514-
checksum = "67ac5a8627ada0968acec063a4746bf79588aa03ccb66db2f75d7dce26722a40"
4515-
dependencies = [
4516-
"async-trait",
4517-
"base64 0.22.1",
4518-
"bytes",
4519-
"http",
4520-
"http-body",
4521-
"http-body-util",
4522-
"percent-encoding",
4523-
"pin-project",
4524-
"sync_wrapper",
4525-
"tokio-stream",
4526-
"tower-layer",
4527-
"tower-service",
4528-
"tracing",
4529-
]
4530-
4531-
[[package]]
4532-
name = "tonic-prost"
4533-
version = "0.14.1"
4534-
source = "registry+https://github.com/rust-lang/crates.io-index"
4535-
checksum = "b9c511b9a96d40cb12b7d5d00464446acf3b9105fd3ce25437cfe41c92b1c87d"
4536-
dependencies = [
4537-
"bytes",
4538-
"prost",
4539-
"tonic",
4540-
]
4541-
45424510
[[package]]
45434511
name = "tower"
45444512
version = "0.5.2"

Cargo-recent.lock

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,9 +2723,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
27232723

27242724
[[package]]
27252725
name = "opentelemetry"
2726-
version = "0.31.0"
2726+
version = "0.32.0"
27272727
source = "registry+https://github.com/rust-lang/crates.io-index"
2728-
checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0"
2728+
checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682"
27292729
dependencies = [
27302730
"futures-core",
27312731
"futures-sink",
@@ -2737,62 +2737,57 @@ dependencies = [
27372737

27382738
[[package]]
27392739
name = "opentelemetry-http"
2740-
version = "0.31.0"
2740+
version = "0.32.0"
27412741
source = "registry+https://github.com/rust-lang/crates.io-index"
2742-
checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d"
2742+
checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331"
27432743
dependencies = [
27442744
"async-trait",
27452745
"bytes",
27462746
"http",
27472747
"opentelemetry",
2748-
"reqwest 0.12.28",
27492748
]
27502749

27512750
[[package]]
27522751
name = "opentelemetry-otlp"
2753-
version = "0.31.1"
2752+
version = "0.32.0"
27542753
source = "registry+https://github.com/rust-lang/crates.io-index"
2755-
checksum = "1f69cd6acbb9af919df949cd1ec9e5e7fdc2ef15d234b6b795aaa525cc02f71f"
2754+
checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35"
27562755
dependencies = [
27572756
"http",
27582757
"opentelemetry",
27592758
"opentelemetry-http",
27602759
"opentelemetry-proto",
27612760
"opentelemetry_sdk",
27622761
"prost",
2763-
"reqwest 0.12.28",
27642762
"thiserror 2.0.18",
2765-
"tracing",
27662763
]
27672764

27682765
[[package]]
27692766
name = "opentelemetry-proto"
2770-
version = "0.31.0"
2767+
version = "0.32.0"
27712768
source = "registry+https://github.com/rust-lang/crates.io-index"
2772-
checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f"
2769+
checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638"
27732770
dependencies = [
27742771
"opentelemetry",
27752772
"opentelemetry_sdk",
27762773
"prost",
2777-
"tonic",
2778-
"tonic-prost",
27792774
]
27802775

27812776
[[package]]
27822777
name = "opentelemetry_sdk"
2783-
version = "0.31.0"
2778+
version = "0.32.1"
27842779
source = "registry+https://github.com/rust-lang/crates.io-index"
2785-
checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd"
2780+
checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9"
27862781
dependencies = [
27872782
"futures-channel",
27882783
"futures-executor",
27892784
"futures-util",
27902785
"opentelemetry",
27912786
"percent-encoding",
2787+
"portable-atomic",
27922788
"rand 0.9.4",
27932789
"thiserror 2.0.18",
27942790
"tokio",
2795-
"tokio-stream",
27962791
]
27972792

27982793
[[package]]
@@ -2992,6 +2987,7 @@ dependencies = [
29922987
"ipnet",
29932988
"maxminddb",
29942989
"mockito",
2990+
"once_cell",
29952991
"opentelemetry",
29962992
"opentelemetry-otlp",
29972993
"opentelemetry_sdk",
@@ -3184,6 +3180,12 @@ dependencies = [
31843180
"universal-hash 0.4.0",
31853181
]
31863182

3183+
[[package]]
3184+
name = "portable-atomic"
3185+
version = "1.13.1"
3186+
source = "registry+https://github.com/rust-lang/crates.io-index"
3187+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
3188+
31873189
[[package]]
31883190
name = "potential_utf"
31893191
version = "0.1.5"
@@ -3556,9 +3558,7 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
35563558
dependencies = [
35573559
"base64 0.22.1",
35583560
"bytes",
3559-
"futures-channel",
35603561
"futures-core",
3561-
"futures-util",
35623562
"http",
35633563
"http-body",
35643564
"http-body-util",
@@ -4696,38 +4696,6 @@ version = "1.1.1+spec-1.1.0"
46964696
source = "registry+https://github.com/rust-lang/crates.io-index"
46974697
checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"
46984698

4699-
[[package]]
4700-
name = "tonic"
4701-
version = "0.14.5"
4702-
source = "registry+https://github.com/rust-lang/crates.io-index"
4703-
checksum = "fec7c61a0695dc1887c1b53952990f3ad2e3a31453e1f49f10e75424943a93ec"
4704-
dependencies = [
4705-
"async-trait",
4706-
"base64 0.22.1",
4707-
"bytes",
4708-
"http",
4709-
"http-body",
4710-
"http-body-util",
4711-
"percent-encoding",
4712-
"pin-project",
4713-
"sync_wrapper",
4714-
"tokio-stream",
4715-
"tower-layer",
4716-
"tower-service",
4717-
"tracing",
4718-
]
4719-
4720-
[[package]]
4721-
name = "tonic-prost"
4722-
version = "0.14.5"
4723-
source = "registry+https://github.com/rust-lang/crates.io-index"
4724-
checksum = "a55376a0bbaa4975a3f10d009ad763d8f4108f067c7c2e74f3001fb49778d309"
4725-
dependencies = [
4726-
"bytes",
4727-
"prost",
4728-
"tonic",
4729-
]
4730-
47314699
[[package]]
47324700
name = "tower"
47334701
version = "0.5.3"

payjoin-mailroom/Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ hyperloglogplus = "0.4.1"
5656
ipnet = { version = "2.9", optional = true }
5757
maxminddb = { version = "0.27", optional = true }
5858
ohttp = { package = "bitcoin-ohttp", version = "0.6.0" }
59-
opentelemetry = "0.31"
60-
opentelemetry-otlp = { version = "0.31", optional = true, features = [
61-
"reqwest-rustls",
59+
opentelemetry = "0.32"
60+
opentelemetry-otlp = { version = "0.32", optional = true, default-features = false, features = [
61+
"http-proto",
6262
] }
63-
opentelemetry_sdk = "0.31"
63+
opentelemetry_sdk = "0.32"
6464
payjoin = { version = "1.0.0-rc.3", features = [
6565
"directory",
6666
], default-features = false }
@@ -89,7 +89,8 @@ ignored = ["unicode-segmentation"]
8989

9090
[dev-dependencies]
9191
mockito = "1.7.0"
92-
opentelemetry_sdk = { version = "0.31", features = ["testing"] }
92+
once_cell = "1.21.3"
93+
opentelemetry_sdk = { version = "0.32", features = ["testing"] }
9394
payjoin-test-utils = { version = "0.0.1" }
9495
rcgen = "0.12"
9596
reqwest = { version = "0.12.23", default-features = false, features = [

payjoin-mailroom/src/ohttp_relay/gateway_prober.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,18 @@ mod tests {
414414
use std::time::Duration;
415415

416416
use mockito::Server;
417+
use once_cell::sync::Lazy;
417418
use tokio::time::advance;
418419

419420
use super::*;
420421
use crate::ohttp_relay::gateway_uri::RFC_9540_GATEWAY_PATH;
421422

423+
static INIT_CRYPTO_PROVIDER: Lazy<()> = Lazy::new(|| {
424+
rustls::crypto::ring::default_provider()
425+
.install_default()
426+
.expect("Failed to install default crypto provider");
427+
});
428+
422429
const BIP77_OPT_IN_RESPONSE: &[u8] = b"\x00\x01\x2aBIP77 454403bb-9f7b-4385-b31f-acd2dae20b7e";
423430
const TIMESTEP: Duration = Duration::from_secs(1); // only used with advance()
424431
const EPSILON: Duration = Duration::from_millis(1); // only used with advance()
@@ -594,6 +601,7 @@ mod tests {
594601

595602
#[tokio::test]
596603
async fn test_assert_opt_in() {
604+
*INIT_CRYPTO_PROVIDER;
597605
// no mock handlers, so any request should fail
598606
let server = Server::new_async().await;
599607
let url =

0 commit comments

Comments
 (0)