Skip to content

Commit 022ecfc

Browse files
authored
use native-tracing versions of hyper and h2 (#591)
This branch patches the dependencies on hyper and h2 to unreleased revisions that use tracing natively to emit diagnostics, rather than log records (which we have to consume through an adapter layer). Native tracing offers a small but noticeable performance improvement, which should become more pronounced when enabling more diagnostics. Signed-off-by: Eliza Weisman <[email protected]>
1 parent abc4f89 commit 022ecfc

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Cargo.lock

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,7 @@ dependencies = [
481481
[[package]]
482482
name = "h2"
483483
version = "0.2.5"
484-
source = "registry+https://github.com/rust-lang/crates.io-index"
485-
checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff"
484+
source = "git+https://github.com/hyperium/h2?rev=d3b9f1e36aadc1a7a6804e2f8e86d3fe4a244b4f#d3b9f1e36aadc1a7a6804e2f8e86d3fe4a244b4f"
486485
dependencies = [
487486
"bytes 0.5.4",
488487
"fnv",
@@ -491,10 +490,10 @@ dependencies = [
491490
"futures-util",
492491
"http 0.2.1",
493492
"indexmap",
494-
"log",
495493
"slab",
496494
"tokio",
497495
"tokio-util",
496+
"tracing",
498497
]
499498

500499
[[package]]
@@ -563,9 +562,8 @@ checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
563562

564563
[[package]]
565564
name = "hyper"
566-
version = "0.13.5"
567-
source = "registry+https://github.com/rust-lang/crates.io-index"
568-
checksum = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14"
565+
version = "0.13.6"
566+
source = "git+https://github.com/hyperium/hyper?rev=9832aef9eeaeff8979354d5de04b8706ff79a233#9832aef9eeaeff8979354d5de04b8706ff79a233"
569567
dependencies = [
570568
"bytes 0.5.4",
571569
"futures-channel",
@@ -576,12 +574,12 @@ dependencies = [
576574
"http-body",
577575
"httparse",
578576
"itoa",
579-
"log",
580-
"net2",
581577
"pin-project",
578+
"socket2",
582579
"time",
583580
"tokio",
584581
"tower-service",
582+
"tracing",
585583
"want",
586584
]
587585

@@ -2654,23 +2652,23 @@ dependencies = [
26542652

26552653
[[package]]
26562654
name = "tracing"
2657-
version = "0.1.9"
2655+
version = "0.1.15"
26582656
source = "registry+https://github.com/rust-lang/crates.io-index"
2659-
checksum = "c21ff9457accc293386c20e8f754d0b059e67e325edf2284f04230d125d7e5ff"
2657+
checksum = "a41f40ed0e162c911ac6fcb53ecdc8134c46905fdbbae8c50add462a538b495f"
26602658
dependencies = [
26612659
"cfg-if",
26622660
"log",
2663-
"spin",
26642661
"tracing-attributes",
26652662
"tracing-core",
26662663
]
26672664

26682665
[[package]]
26692666
name = "tracing-attributes"
2670-
version = "0.1.3"
2667+
version = "0.1.8"
26712668
source = "registry+https://github.com/rust-lang/crates.io-index"
2672-
checksum = "5e27d1065a1de5d8ad2637e41fe14d3cd14363d4a20cb99090b9012004955637"
2669+
checksum = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c"
26732670
dependencies = [
2671+
"proc-macro2 1.0.10",
26742672
"quote 1.0.2",
26752673
"syn 1.0.21",
26762674
]

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ debug = false
6464
[patch.crates-io]
6565
webpki = { git = "https://github.com/linkerd/webpki", branch = "cert-dns-names-0.21" }
6666
tower = { version = "0.3", git = "https://github.com/tower-rs/tower", rev = "8752a3811788e94670c62dc0acbc9613207931b1"}
67+
# Un-patch after h2 v0.2.6 is published
68+
h2 = { git = "https://github.com/hyperium/h2", rev = "d3b9f1e36aadc1a7a6804e2f8e86d3fe4a244b4f"}
69+
# Un-patch after hyper v0.13.7 is published
70+
hyper = { version = "0.13", git = "https://github.com/hyperium/hyper", rev = "9832aef9eeaeff8979354d5de04b8706ff79a233"}

0 commit comments

Comments
 (0)