Skip to content

Commit 2297f8e

Browse files
authored
build(deps): bump tokio from 1.44.2 to 1.45.0 (#4520)
2 parents c105495 + cfb001a commit 2297f8e

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ version = "0.2.1"
371371

372372
# Async runtime
373373
[workspace.dependencies.tokio]
374-
version = "1.44.2"
374+
version = "1.45.0"
375375
features = ["full"]
376376

377377
[workspace.dependencies.tokio-stream]

crates/cli/src/telemetry/tokio.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ pub fn observe(metrics: RuntimeMetrics) {
126126
.build();
127127
}
128128

129-
#[cfg(tokio_unstable)]
130129
{
131130
let metrics = metrics.clone();
132131
METER
@@ -144,6 +143,19 @@ pub fn observe(metrics: RuntimeMetrics) {
144143
.build();
145144
}
146145

146+
#[cfg(tokio_unstable)]
147+
{
148+
let metrics = metrics.clone();
149+
METER
150+
.u64_observable_counter("tokio_runtime.spawned_tasks_count")
151+
.with_description("The number of tasks spawned in this runtime since it was created.")
152+
.with_unit("{task}")
153+
.with_callback(move |instrument| {
154+
instrument.observe(metrics.spawned_tasks_count(), &[]);
155+
})
156+
.build();
157+
}
158+
147159
#[cfg(tokio_unstable)]
148160
{
149161
let metrics = metrics.clone();
@@ -163,7 +175,6 @@ pub fn observe(metrics: RuntimeMetrics) {
163175
.build();
164176
}
165177

166-
#[cfg(tokio_unstable)]
167178
{
168179
let metrics = metrics.clone();
169180
METER
@@ -247,7 +258,6 @@ pub fn observe(metrics: RuntimeMetrics) {
247258
.build();
248259
}
249260

250-
#[cfg(tokio_unstable)]
251261
{
252262
let metrics = metrics.clone();
253263
METER
@@ -416,7 +426,6 @@ pub fn observe(metrics: RuntimeMetrics) {
416426
}
417427

418428
/// Helper to construct a [`KeyValue`] with the worker index.
419-
#[allow(dead_code)]
420429
fn worker_idx(i: usize) -> KeyValue {
421430
KeyValue::new("worker_idx", i.try_into().unwrap_or(i64::MAX))
422431
}

0 commit comments

Comments
 (0)