Skip to content

Commit f45f04b

Browse files
authored
trace: update task-tracking to Tokio 0.3 (#778)
This branch updates the `tokio-trace` crate, which we use to implement the task-tracking endpoint, to a version that depends on Tokio 0.3. This is necessary for task tracking to work, and also removes an unnecessary Tokio 0.2 dep from our dependency tree. Also, the future type name field was removed in Tokio 0.3, since it's _far_ too long to be useful, and was replaced with spawn locations. Hopefully, this will make task tracking significantly more useful, and reduce the memory overhead.
1 parent 80aae19 commit f45f04b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,7 +2586,6 @@ dependencies = [
25862586
"memchr 2.3.3",
25872587
"pin-project-lite 0.1.4",
25882588
"slab",
2589-
"tracing",
25902589
]
25912590

25922591
[[package]]
@@ -2608,6 +2607,7 @@ dependencies = [
26082607
"signal-hook-registry",
26092608
"slab",
26102609
"tokio-macros",
2610+
"tracing",
26112611
"winapi 0.3.8",
26122612
]
26132613

@@ -2699,11 +2699,11 @@ dependencies = [
26992699
[[package]]
27002700
name = "tokio-trace"
27012701
version = "0.1.0"
2702-
source = "git+https://github.com/hawkw/tokio-trace?rev=a8240c5cbb4ff981def84920d4087ef23b5edb93#a8240c5cbb4ff981def84920d4087ef23b5edb93"
2702+
source = "git+https://github.com/hawkw/tokio-trace?rev=8bba933f49349cc14665bee7b102f013119c74fa#8bba933f49349cc14665bee7b102f013119c74fa"
27032703
dependencies = [
27042704
"num_cpus",
27052705
"serde",
2706-
"tokio 0.2.23",
2706+
"tokio 0.3.5",
27072707
"tracing-core",
27082708
"tracing-subscriber",
27092709
]

linkerd/tracing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ hyper = "0.14.0-dev"
1313
linkerd2-error = { path = "../error" }
1414
serde_json = "1"
1515
tokio-timer = "0.2"
16-
tokio-trace = { git = "https://github.com/hawkw/tokio-trace", rev = "a8240c5cbb4ff981def84920d4087ef23b5edb93", features = ["serde"] }
16+
tokio-trace = { git = "https://github.com/hawkw/tokio-trace", rev = "8bba933f49349cc14665bee7b102f013119c74fa", features = ["serde"] }
1717
tracing = "0.1.22"
1818
tracing-log = "0.1"
1919

linkerd/tracing/src/tasks.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl Handle {
5858
<th>Busy Time</th>
5959
<th>Idle Time</th>
6060
<th>Scope</th>
61-
<th>Future</th>
61+
<th>Spawn Location</th>
6262
</tr>
6363
</thead>
6464
<tbody>
@@ -76,7 +76,7 @@ impl Handle {
7676
<td>{busy:?}</td>
7777
<td>{idle:?}</td>
7878
<td>{scope}</td>
79-
<td>{future}</td>
79+
<td>{location}</td>
8080
</tr>
8181
",
8282
kind = task.kind,
@@ -86,7 +86,7 @@ impl Handle {
8686
busy = timings.busy_time(),
8787
idle = timings.idle_time(),
8888
scope = html_escape::encode_text(&task.scope),
89-
future = html_escape::encode_text(&task.future),
89+
location = html_escape::encode_text(&task.location),
9090
)
9191
.expect("writing to a String doesn't fail");
9292
});

0 commit comments

Comments
 (0)