Detailed changes
@@ -405,6 +405,7 @@ dependencies = [
"theme",
"time",
"time_format",
+ "tracing",
"tree-sitter-md",
"ui",
"ui_input",
@@ -415,6 +416,7 @@ dependencies = [
"watch",
"workspace",
"zed_actions",
+ "ztracing",
]
[[package]]
@@ -9701,8 +9703,10 @@ dependencies = [
"settings",
"sum_tree",
"theme",
+ "tracing",
"ui",
"util",
+ "ztracing",
]
[[package]]
@@ -20786,6 +20790,7 @@ dependencies = [
"watch",
"web_search",
"web_search_providers",
+ "which 6.0.3",
"which_key",
"windows 0.61.3",
"winresource",
@@ -103,6 +103,8 @@ zed_actions.workspace = true
image.workspace = true
async-fs.workspace = true
reqwest_client = { workspace = true, optional = true }
+ztracing.workspace = true
+tracing.workspace = true
[dev-dependencies]
acp_thread = { workspace = true, features = ["test-support"] }
@@ -124,3 +126,6 @@ semver.workspace = true
reqwest_client.workspace = true
tree-sitter-md.workspace = true
unindent.workspace = true
+
+[package.metadata.cargo-machete]
+ignored = ["tracing"]
@@ -965,6 +965,7 @@ impl Focusable for MessageEditor {
}
impl Render for MessageEditor {
+ #[ztracing::instrument(skip_all)]
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
div()
.key_context("MessageEditor")
@@ -1925,6 +1925,7 @@ impl AcpThreadView {
.detach_and_log_err(cx);
}
+ #[ztracing::instrument(skip_all)]
fn render_entry(
&self,
entry_ix: usize,
@@ -2302,6 +2303,7 @@ impl AcpThreadView {
rems_from_px(13.)
}
+ #[ztracing::instrument(skip_all)]
fn render_thinking_block(
&self,
entry_ix: usize,
@@ -2403,6 +2405,7 @@ impl AcpThreadView {
.into_any_element()
}
+ #[ztracing::instrument(skip_all)]
fn render_tool_call(
&self,
entry_ix: usize,
@@ -2631,6 +2634,7 @@ impl AcpThreadView {
.children(tool_output_display)
}
+ #[ztracing::instrument(skip_all)]
fn render_tool_call_label(
&self,
entry_ix: usize,
@@ -2739,6 +2743,7 @@ impl AcpThreadView {
.when(!is_edit, |this| this.child(gradient_overlay))
}
+ #[ztracing::instrument(skip_all)]
fn render_tool_call_content(
&self,
entry_ix: usize,
@@ -2773,6 +2778,7 @@ impl AcpThreadView {
}
}
+ #[ztracing::instrument(skip_all)]
fn render_markdown_output(
&self,
markdown: Entity<Markdown>,
@@ -3037,6 +3043,7 @@ impl AcpThreadView {
.into_any()
}
+ #[ztracing::instrument(skip_all)]
fn render_terminal_tool_call(
&self,
entry_ix: usize,
@@ -3724,6 +3731,7 @@ impl AcpThreadView {
editor_bg_color.blend(active_color.opacity(0.3))
}
+ #[ztracing::instrument(skip_all)]
fn render_activity_bar(
&self,
thread_entity: &Entity<AcpThread>,
@@ -3791,6 +3799,7 @@ impl AcpThreadView {
.into()
}
+ #[ztracing::instrument(skip_all)]
fn render_plan_summary(
&self,
plan: &Plan,
@@ -3886,6 +3895,7 @@ impl AcpThreadView {
}))
}
+ #[ztracing::instrument(skip_all)]
fn render_plan_entries(
&self,
plan: &Plan,
@@ -3946,6 +3956,7 @@ impl AcpThreadView {
.into_any_element()
}
+ #[ztracing::instrument(skip_all)]
fn render_edits_summary(
&self,
changed_buffers: &BTreeMap<Entity<Buffer>, Entity<BufferDiff>>,
@@ -4074,6 +4085,7 @@ impl AcpThreadView {
)
}
+ #[ztracing::instrument(skip_all)]
fn render_edited_files(
&self,
action_log: &Entity<ActionLog>,
@@ -4711,6 +4723,7 @@ impl AcpThreadView {
}))
}
+ #[ztracing::instrument(skip_all)]
fn render_markdown(&self, markdown: Entity<Markdown>, style: MarkdownStyle) -> MarkdownElement {
let workspace = self.workspace.clone();
MarkdownElement::new(markdown, style).on_url_click(move |text, window, cx| {
@@ -5992,6 +6005,7 @@ impl Focusable for AcpThreadView {
}
impl Render for AcpThreadView {
+ #[ztracing::instrument(skip_all)]
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let has_messages = self.list_state.item_count() > 0;
let line_height = TextSize::Small.rems(cx).to_pixels(window.rem_size()) * 1.5;
@@ -1757,6 +1757,7 @@ impl AgentPanel {
});
}
+ #[ztracing::instrument(skip_all)]
fn render_panel_options_menu(
&self,
window: &mut Window,
@@ -2563,6 +2564,7 @@ impl AgentPanel {
}
}
+ #[ztracing::instrument(skip_all)]
fn render_text_thread(
&self,
text_thread_editor: &Entity<TextThreadEditor>,
@@ -2737,6 +2739,7 @@ impl AgentPanel {
}
impl Render for AgentPanel {
+ #[ztracing::instrument(skip_all)]
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
// WARNING: Changes to this element hierarchy can have
// non-obvious implications to the layout of children.
@@ -2651,6 +2651,7 @@ impl EventEmitter<EditorEvent> for TextThreadEditor {}
impl EventEmitter<SearchEvent> for TextThreadEditor {}
impl Render for TextThreadEditor {
+ #[ztracing::instrument(skip_all)]
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let language_model_selector = self.language_model_selector_menu_handle.clone();
@@ -29,8 +29,10 @@ log.workspace = true
pulldown-cmark.workspace = true
sum_tree.workspace = true
theme.workspace = true
+tracing.workspace = true
ui.workspace = true
util.workspace = true
+ztracing.workspace = true
[dev-dependencies]
assets.workspace = true
@@ -41,3 +43,6 @@ languages = { workspace = true, features = ["load-grammars"] }
node_runtime.workspace = true
settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
+
+[package.metadata.cargo-machete]
+ignored = ["tracing"]
@@ -831,6 +831,7 @@ impl Element for MarkdownElement {
None
}
+ #[ztracing::instrument(skip_all)]
fn request_layout(
&mut self,
_id: Option<&GlobalElementId>,
@@ -1324,6 +1325,7 @@ impl Element for MarkdownElement {
(layout_id, rendered_markdown)
}
+ #[ztracing::instrument(skip_all)]
fn prepaint(
&mut self,
_id: Option<&GlobalElementId>,
@@ -1343,6 +1345,7 @@ impl Element for MarkdownElement {
hitbox
}
+ #[ztracing::instrument(skip_all)]
fn paint(
&mut self,
_id: Option<&GlobalElementId>,