Add support for manual spans, expand instrumentation (#44663)

Release Notes:

- N/A

---------

Co-authored-by: Cameron <cameron@zed.dev>
This commit is contained in:
Yara 🏳️‍⚧️
2025-12-11 22:29:47 +00:00
committed by GitHub
co-authored by Cameron
parent 07748b7bae
commit 1029a8fbaf
13 changed files with 118 additions and 5 deletions
+4
View File
@@ -1202,6 +1202,7 @@ impl MultiBuffer {
}
/// Returns an up-to-date snapshot of the MultiBuffer.
#[ztracing::instrument(skip_all)]
pub fn snapshot(&self, cx: &App) -> MultiBufferSnapshot {
self.sync(cx);
self.snapshot.borrow().clone()
@@ -1927,6 +1928,7 @@ impl MultiBuffer {
cx.notify();
}
#[ztracing::instrument(skip_all)]
pub fn excerpts_for_buffer(
&self,
buffer_id: BufferId,
@@ -2887,6 +2889,7 @@ impl MultiBuffer {
cx.notify();
}
#[ztracing::instrument(skip_all)]
fn sync(&self, cx: &App) {
let changed = self.buffer_changed_since_sync.replace(false);
if !changed {
@@ -5627,6 +5630,7 @@ impl MultiBufferSnapshot {
/// excerpt
///
/// Can optionally pass a range_filter to filter the ranges of brackets to consider
#[ztracing::instrument(skip_all)]
pub fn innermost_enclosing_bracket_ranges<T: ToOffset>(
&self,
range: Range<T>,