Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ version = "0.2.1"

# Async runtime
[workspace.dependencies.tokio]
version = "1.44.2"
version = "1.45.0"
features = ["full"]

[workspace.dependencies.tokio-stream]
Expand Down
17 changes: 13 additions & 4 deletions crates/cli/src/telemetry/tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ pub fn observe(metrics: RuntimeMetrics) {
.build();
}

#[cfg(tokio_unstable)]
{
let metrics = metrics.clone();
METER
Expand All @@ -144,6 +143,19 @@ pub fn observe(metrics: RuntimeMetrics) {
.build();
}

#[cfg(tokio_unstable)]
{
let metrics = metrics.clone();
METER
.u64_observable_counter("tokio_runtime.spawned_tasks_count")
.with_description("The number of tasks spawned in this runtime since it was created.")
.with_unit("{task}")
.with_callback(move |instrument| {
instrument.observe(metrics.spawned_tasks_count(), &[]);
})
.build();
}

#[cfg(tokio_unstable)]
{
let metrics = metrics.clone();
Expand All @@ -163,7 +175,6 @@ pub fn observe(metrics: RuntimeMetrics) {
.build();
}

#[cfg(tokio_unstable)]
{
let metrics = metrics.clone();
METER
Expand Down Expand Up @@ -247,7 +258,6 @@ pub fn observe(metrics: RuntimeMetrics) {
.build();
}

#[cfg(tokio_unstable)]
{
let metrics = metrics.clone();
METER
Expand Down Expand Up @@ -416,7 +426,6 @@ pub fn observe(metrics: RuntimeMetrics) {
}

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