Skip to content
Closed
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
24 changes: 15 additions & 9 deletions crates/tracedecay-sessions/src/runtime/ingest/project_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,17 @@ impl<'a> ProjectProviderRun<'a> {
continue;
};
if persisted_day.is_some_and(|day| path.parent() != Some(day)) {
let membership = run_blocking_transcript_section("codex", {
let path = path.clone();
let project_root = self.project_root.to_path_buf();
move || {
codex::codex_rollout_project_membership(&path, &project_root)
== Some(ProjectMembership::NoMatch)
}
})
let membership = tracing::Instrument::instrument(
run_blocking_transcript_section("codex", {
let path = path.clone();
let project_root = self.project_root.to_path_buf();
move || {
codex::codex_rollout_project_membership(&path, &project_root)
== Some(ProjectMembership::NoMatch)
}
}),
tracing::trace_span!("sessions.ingest.project.codex.membership_check"),
)
.await;
match membership {
Ok(false) => {}
Expand Down Expand Up @@ -371,7 +374,10 @@ impl<'a> ProjectProviderRun<'a> {
{
Ok(progress) => {
if let Err(error) =
pending.admitted(progress.source_deferred, progress.covered_through)
tracing::trace_span!("sessions.ingest.project.codex.convergence_settle")
.in_scope(|| {
pending.admitted(progress.source_deferred, progress.covered_through)
})
{
outcome.add_failure(warn_transcript_catch_up_failure(
"codex",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,12 @@ impl ActiveAdmission<'_> {
requests.push(self.capture_request(batch_expected, frame, retention_class)?);
batch_expected = next_expected;
}
match self.admission.capture_observations(requests).await {
match tracing::Instrument::instrument(
self.admission.capture_observations(requests),
tracing::trace_span!("sessions.observation.admit_jsonl.capture_batch"),
)
.await
{
Ok(outcomes) => {
if outcomes.len() != checkpoints.len() {
return Err(CaptureWindowError::Ingest(
Expand Down Expand Up @@ -2344,17 +2349,18 @@ pub(in crate::runtime) async fn admit_jsonl_observations<State: Clone>(
if cancellation.is_cancelled() {
return Err(TranscriptIngestError::Cancelled { provider });
}
let mut expected_cursor =
admission
.get_source_cursor(&source, &scope)
.await
.map_err(|outcome| {
if is_admission_cancellation(&outcome, &cancellation) {
TranscriptIngestError::Cancelled { provider }
} else {
host_admission_error(provider, outcome)
}
})?;
let mut expected_cursor = tracing::Instrument::instrument(
admission.get_source_cursor(&source, &scope),
tracing::trace_span!("sessions.observation.admit_jsonl.cursor_lookup"),
)
.await
.map_err(|outcome| {
if is_admission_cancellation(&outcome, &cancellation) {
TranscriptIngestError::Cancelled { provider }
} else {
host_admission_error(provider, outcome)
}
})?;
if cancellation.is_cancelled() {
return Err(TranscriptIngestError::Cancelled { provider });
}
Expand Down
Loading