Unverified Commit 88027c21 authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

turbopack tracing: add chunk_name to `get HMR events` span (#94061)

This adds the chunk's file path to the span as metadata.
parent 8aa475b4
......@@ -2412,6 +2412,12 @@ impl Project {
// sessions.
let _ = session;
#[tracing::instrument(
level = "info",
name = "get HMR version",
skip_all,
fields(chunk_name = %chunk_name, target = %target),
)]
#[turbo_tasks::function(operation, root)]
async fn hmr_version_operation(
this: ResolvedVc<Project>,
......
......@@ -1814,6 +1814,12 @@ fn project_hmr_update_operation(
project.hmr_update(chunk_name, target, *state)
}
#[tracing::instrument(
level = "info",
name = "hmr subscription",
skip_all,
fields(chunk_name = %chunk_name, target = %target),
)]
#[turbo_tasks::function(operation, root)]
async fn hmr_update_with_issues_operation(
project: ResolvedVc<Project>,
......@@ -1838,7 +1844,7 @@ async fn hmr_update_with_issues_operation(
.cell())
}
#[tracing::instrument(level = "info", name = "get HMR events", skip(project, func), fields(target = %target))]
#[tracing::instrument(level = "info", name = "get HMR events", skip(project, func), fields(target = %target, chunk_name = %chunk_name))]
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
pub fn project_hmr_events(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment