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
10 changes: 5 additions & 5 deletions crates/napi/src/next_api/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async fn get_written_endpoint_with_issues_operation(
.cell())
}

#[tracing::instrument(level = "info", name = "write endpoint to disk", skip_all)]
#[tracing::instrument(level = "trace", name = "write endpoint to disk", skip_all)]
#[napi]
pub async fn endpoint_write_to_disk(
#[napi(ts_arg_type = "{ __napiType: \"Endpoint\" }")] endpoint: External<ExternalEndpoint>,
Expand Down Expand Up @@ -156,7 +156,7 @@ pub async fn endpoint_write_to_disk(
})
}

#[tracing::instrument(level = "info", name = "get server-side endpoint changes", skip_all)]
#[tracing::instrument(level = "trace", name = "get server-side endpoint changes", skip_all)]
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
pub fn endpoint_server_changed_subscribe(
#[napi(ts_arg_type = "{ __napiType: \"Endpoint\" }")] endpoint: External<ExternalEndpoint>,
Expand All @@ -175,7 +175,7 @@ pub fn endpoint_server_changed_subscribe(
result.effects.apply().await?;
Ok(result)
}
.instrument(tracing::info_span!("server changes subscription"))
.instrument(tracing::trace_span!("server changes subscription"))
},
|ctx| {
let EndpointIssuesAndDiags {
Expand Down Expand Up @@ -247,7 +247,7 @@ async fn subscribe_issues_and_diags_operation(
}
}

#[tracing::instrument(level = "info", name = "get client-side endpoint changes", skip_all)]
#[tracing::instrument(level = "trace", name = "get client-side endpoint changes", skip_all)]
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
pub fn endpoint_client_changed_subscribe(
#[napi(ts_arg_type = "{ __napiType: \"Endpoint\" }")] endpoint: External<ExternalEndpoint>,
Expand All @@ -270,7 +270,7 @@ pub fn endpoint_client_changed_subscribe(
let _ = changed_op.read_strongly_consistent().await?;
Ok(())
}
.instrument(tracing::info_span!("client changes subscription"))
.instrument(tracing::trace_span!("client changes subscription"))
},
|_| {
Ok(vec![TurbopackResult {
Expand Down
30 changes: 16 additions & 14 deletions crates/napi/src/next_api/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ pub fn project_new(
println!("Failed to benchmark file I/O: {err}");
}
}
.instrument(tracing::info_span!("benchmark file I/O"))
.instrument(tracing::trace_span!("benchmark file I/O"))
});
}

Expand All @@ -531,7 +531,7 @@ pub fn project_new(
exit_receiver: tokio::sync::Mutex::new(Some(exit_receiver)),
}))
}
.instrument(tracing::info_span!("create project")),
.instrument(tracing::trace_span!("create project")),
)
}

Expand Down Expand Up @@ -605,7 +605,9 @@ async fn benchmark_file_io(turbo_tasks: NextTurboTasks, directory: FileSystemPat
}
anyhow::Ok(())
}
.instrument(tracing::info_span!("benchmark file IO (measurement)", path = %temp_path.display()))
.instrument(
tracing::trace_span!("benchmark file IO (measurement)", path = %temp_path.display()),
)
.await?;

let duration = Instant::now().duration_since(start);
Expand All @@ -619,7 +621,7 @@ async fn benchmark_file_io(turbo_tasks: NextTurboTasks, directory: FileSystemPat
Ok(())
}

#[tracing::instrument(level = "info", name = "update project", skip_all)]
#[tracing::instrument(level = "trace", name = "update project", skip_all)]
#[napi]
pub async fn project_update(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -682,7 +684,7 @@ async fn project_on_exit_internal(project: &ProjectInstance) {
/// This is used in builds where it's important that we completely persist turbo-tasks to disk, but
/// it's skipped in the development server (`project_on_exit` is used instead with a short timeout),
/// where we prioritize fast exit and user responsiveness over all else.
#[tracing::instrument(level = "info", name = "shutdown project", skip_all)]
#[tracing::instrument(level = "trace", name = "shutdown project", skip_all)]
#[napi]
pub async fn project_shutdown(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -931,7 +933,7 @@ struct AllWrittenEntrypointsWithIssues {
effects: Arc<Effects>,
}

#[tracing::instrument(level = "info", name = "write all entrypoints to disk", skip_all)]
#[tracing::instrument(level = "trace", name = "write all entrypoints to disk", skip_all)]
#[napi]
pub async fn project_write_all_entrypoints_to_disk(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -1045,7 +1047,7 @@ async fn output_assets_operation(
))
}

#[tracing::instrument(level = "info", name = "get entrypoints", skip_all)]
#[tracing::instrument(level = "trace", name = "get entrypoints", skip_all)]
#[napi]
pub async fn project_entrypoints(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -1088,7 +1090,7 @@ pub async fn project_entrypoints(
})
}

#[tracing::instrument(level = "info", name = "subscribe to entrypoints", skip_all)]
#[tracing::instrument(level = "trace", name = "subscribe to entrypoints", skip_all)]
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
pub fn project_entrypoints_subscribe(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand All @@ -1114,7 +1116,7 @@ pub fn project_entrypoints_subscribe(
effects.apply().await?;
Ok((entrypoints.clone(), issues.clone(), diagnostics.clone()))
}
.instrument(tracing::info_span!("entrypoints subscription"))
.instrument(tracing::trace_span!("entrypoints subscription"))
},
move |ctx| {
let (entrypoints, issues, diags) = ctx.value;
Expand Down Expand Up @@ -1175,7 +1177,7 @@ fn project_hmr_update_operation(
project.hmr_update(identifier, *state)
}

#[tracing::instrument(level = "info", name = "get HMR events", skip(project, func))]
#[tracing::instrument(level = "trace", name = "get HMR events", skip(project, func))]
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
pub fn project_hmr_events(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -1298,7 +1300,7 @@ fn project_container_hmr_identifiers_operation(
container.hmr_identifiers()
}

#[tracing::instrument(level = "info", name = "get HMR identifiers", skip_all)]
#[tracing::instrument(level = "trace", name = "get HMR identifiers", skip_all)]
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
pub fn project_hmr_identifiers_subscribe(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -1675,7 +1677,7 @@ pub async fn project_trace_source_operation(
})))
}

#[tracing::instrument(level = "info", name = "apply SourceMap to stack frame", skip_all)]
#[tracing::instrument(level = "trace", name = "apply SourceMap to stack frame", skip_all)]
#[napi]
pub async fn project_trace_source(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand All @@ -1702,7 +1704,7 @@ pub async fn project_trace_source(
.map_err(|e| napi::Error::from_reason(PrettyPrintError(&e.into()).to_string()))
}

#[tracing::instrument(level = "info", name = "get source content for asset", skip_all)]
#[tracing::instrument(level = "trace", name = "get source content for asset", skip_all)]
#[napi]
pub async fn project_get_source_for_asset(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down Expand Up @@ -1736,7 +1738,7 @@ pub async fn project_get_source_for_asset(
.map_err(|e| napi::Error::from_reason(PrettyPrintError(&e.into()).to_string()))
}

#[tracing::instrument(level = "info", name = "get SourceMap for asset", skip_all)]
#[tracing::instrument(level = "trace", name = "get SourceMap for asset", skip_all)]
#[napi]
pub async fn project_get_source_map(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
Expand Down
10 changes: 5 additions & 5 deletions crates/next-api/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ impl AppProject {
}
.cell())
}
.instrument(tracing::info_span!("module graph for endpoint"))
.instrument(tracing::trace_span!("module graph for endpoint"))
.await
} else {
Ok(self.project.whole_app_module_graphs())
Expand Down Expand Up @@ -1905,19 +1905,19 @@ impl Endpoint for AppEndpoint {
ty: AppPageEndpointType::Html,
..
} => {
tracing::info_span!("app endpoint HTML", name = page_name)
tracing::trace_span!("app endpoint HTML", name = page_name)
}
AppEndpointType::Page {
ty: AppPageEndpointType::Rsc,
..
} => {
tracing::info_span!("app endpoint RSC", name = page_name)
tracing::trace_span!("app endpoint RSC", name = page_name)
}
AppEndpointType::Route { .. } => {
tracing::info_span!("app endpoint route", name = page_name)
tracing::trace_span!("app endpoint route", name = page_name)
}
AppEndpointType::Metadata { .. } => {
tracing::info_span!("app endpoint metadata", name = page_name)
tracing::trace_span!("app endpoint metadata", name = page_name)
}
};

Expand Down
2 changes: 1 addition & 1 deletion crates/next-api/src/instrumentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl InstrumentationEndpoint {
impl Endpoint for InstrumentationEndpoint {
#[turbo_tasks::function]
async fn output(self: ResolvedVc<Self>) -> Result<Vc<EndpointOutput>> {
let span = tracing::info_span!("instrumentation endpoint");
let span = tracing::trace_span!("instrumentation endpoint");
async move {
let this = self.await?;
let output_assets = self.output_assets();
Expand Down
4 changes: 2 additions & 2 deletions crates/next-api/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl MiddlewareEndpoint {
impl Endpoint for MiddlewareEndpoint {
#[turbo_tasks::function]
async fn output(self: ResolvedVc<Self>) -> Result<Vc<EndpointOutput>> {
let span = tracing::info_span!("middleware endpoint");
let span = tracing::trace_span!("middleware endpoint");
async move {
let this = self.await?;
let output_assets = self.output_assets();
Expand All @@ -348,7 +348,7 @@ impl Endpoint for MiddlewareEndpoint {
let client_paths = all_paths_in_root(output_assets, client_relative_root)
.into_future()
.owned()
.instrument(tracing::info_span!("client_paths"))
.instrument(tracing::trace_span!("client_paths"))
.await?;
(server_paths, client_paths)
} else {
Expand Down
20 changes: 10 additions & 10 deletions crates/next-api/src/module_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl NextDynamicGraphs {
.try_join()
.await
}
.instrument(tracing::info_span!("generating next/dynamic graphs"))
.instrument(tracing::trace_span!("generating next/dynamic graphs"))
.await?;
Ok(Self(next_dynamic).cell())
}
Expand All @@ -88,7 +88,7 @@ impl NextDynamicGraphs {
&self,
entry: Vc<Box<dyn Module>>,
) -> Result<Vc<DynamicImportEntriesWithImporter>> {
let span = tracing::info_span!("collect all next/dynamic imports for endpoint");
let span = tracing::trace_span!("collect all next/dynamic imports for endpoint");
async move {
if let [graph] = &self.0[..] {
// Just a single graph, no need to merge results
Expand Down Expand Up @@ -147,7 +147,7 @@ impl NextDynamicGraph {
&self,
entry: ResolvedVc<Box<dyn Module>>,
) -> Result<Vc<DynamicImportEntriesWithImporter>> {
let span = tracing::info_span!("collect next/dynamic imports for endpoint");
let span = tracing::trace_span!("collect next/dynamic imports for endpoint");
async move {
let data = &*self.data.await?;
let graph = self.graph.await?;
Expand Down Expand Up @@ -257,7 +257,7 @@ impl ServerActionsGraphs {
.try_join()
.await
}
.instrument(tracing::info_span!("generating server actions graphs"))
.instrument(tracing::trace_span!("generating server actions graphs"))
.await?;
Ok(Self(server_actions).cell())
}
Expand All @@ -284,7 +284,7 @@ impl ServerActionsGraphs {
entry: Vc<Box<dyn Module>>,
rsc_asset_context: Vc<Box<dyn AssetContext>>,
) -> Result<Vc<AllActions>> {
let span = tracing::info_span!("collect all server actions for endpoint");
let span = tracing::trace_span!("collect all server actions for endpoint");
async move {
if let [graph] = &self.0[..] {
// Just a single graph, no need to merge results
Expand Down Expand Up @@ -333,7 +333,7 @@ impl ServerActionsGraph {
entry: ResolvedVc<Box<dyn Module>>,
rsc_asset_context: Vc<Box<dyn AssetContext>>,
) -> Result<Vc<AllActions>> {
let span = tracing::info_span!("collect server actions for endpoint");
let span = tracing::trace_span!("collect server actions for endpoint");
async move {
let data = &*self.data.await?;
let data = if self.is_single_page {
Expand Down Expand Up @@ -430,7 +430,7 @@ impl ClientReferencesGraphs {
.try_join()
.await
}
.instrument(tracing::info_span!("generating client references graphs"))
.instrument(tracing::trace_span!("generating client references graphs"))
.await?;
Ok(Self(client_references).cell())
}
Expand Down Expand Up @@ -458,7 +458,7 @@ impl ClientReferencesGraphs {
has_layout_segments: bool,
include_traced: bool,
) -> Result<Vc<ClientReferenceGraphResult>> {
let span = tracing::info_span!("collect all client references for endpoint");
let span = tracing::trace_span!("collect all client references for endpoint");
async move {
let result = if let [graph] = &self.0[..] {
// Just a single graph, no need to merge results This also naturally aggregates
Expand Down Expand Up @@ -530,7 +530,7 @@ impl ClientReferencesGraph {
&self,
entry: ResolvedVc<Box<dyn Module>>,
) -> Result<Vc<ClientReferenceGraphResult>> {
let span = tracing::info_span!("collect client references for endpoint");
let span = tracing::trace_span!("collect client references for endpoint");
async move {
let data = &*self.data.await?;
let graph = self.graph.await?;
Expand Down Expand Up @@ -758,7 +758,7 @@ type FxModuleNameMap = FxIndexMap<ResolvedVc<Box<dyn Module>>, RcStr>;
#[turbo_tasks::value(transparent)]
struct ModuleNameMap(pub FxModuleNameMap);

#[tracing::instrument(level = "info", name = "validate pages css imports", skip_all)]
#[tracing::instrument(level = "trace", name = "validate pages css imports", skip_all)]
#[turbo_tasks::function]
async fn validate_pages_css_imports_individual(
graph: Vc<SingleModuleGraph>,
Expand Down
2 changes: 1 addition & 1 deletion crates/next-api/src/nft_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Asset for NftJsonAsset {
#[turbo_tasks::function]
async fn content(self: Vc<Self>) -> Result<Vc<AssetContent>> {
let this = &*self.await?;
let span = tracing::info_span!(
let span = tracing::trace_span!(
"output file tracing",
path = display(self.path().to_string().await?)
);
Expand Down
16 changes: 8 additions & 8 deletions crates/next-api/src/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ impl PageEndpoint {

Ok(client_chunk_group)
}
.instrument(tracing::info_span!("page client side rendering"))
.instrument(tracing::trace_span!("page client side rendering"))
.await
}

Expand Down Expand Up @@ -1112,9 +1112,9 @@ impl PageEndpoint {
}
}
.instrument(match ty {
SsrChunkType::Page => tracing::info_span!("page server side rendering"),
SsrChunkType::Data => tracing::info_span!("server side data"),
SsrChunkType::Api => tracing::info_span!("server side api"),
SsrChunkType::Page => tracing::trace_span!("page server side rendering"),
SsrChunkType::Data => tracing::trace_span!("server side data"),
SsrChunkType::Api => tracing::trace_span!("server side api"),
})
.await
}
Expand Down Expand Up @@ -1572,16 +1572,16 @@ impl Endpoint for PageEndpoint {
let span = {
match &this.ty {
PageEndpointType::Html => {
tracing::info_span!("page endpoint HTML", name = display(original_name))
tracing::trace_span!("page endpoint HTML", name = display(original_name))
}
PageEndpointType::Data => {
tracing::info_span!("page endpoint data", name = display(original_name))
tracing::trace_span!("page endpoint data", name = display(original_name))
}
PageEndpointType::Api => {
tracing::info_span!("page endpoint API", name = display(original_name))
tracing::trace_span!("page endpoint API", name = display(original_name))
}
PageEndpointType::SsrOnly => {
tracing::info_span!("page endpoint SSR", name = display(original_name))
tracing::trace_span!("page endpoint SSR", name = display(original_name))
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion crates/next-api/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub async fn all_server_paths(
assets: Vc<OutputAssets>,
node_root: FileSystemPath,
) -> Result<Vc<ServerPaths>> {
let span = tracing::info_span!(
let span = tracing::trace_span!(
"collect all server paths",
assets_count = tracing::field::Empty,
server_assets_count = tracing::field::Empty
Expand Down
Loading
Loading