Log slow API requests with server spans and client timing

This commit is contained in:
Ian Gulliver
2026-10-21 14:45:19 -07:00
parent 671165ec71
commit b4c1dbab37
31 changed files with 458 additions and 185 deletions
+3 -3
View File
@@ -134,7 +134,7 @@ func (m *Manager) takeSnapshot(ctx context.Context, t snapTarget, trigger api.Sn
}
}
tree, err := git.Snapshot(t.dir)
tree, err := git.Snapshot(ctx, t.dir)
if err != nil {
return nil, err
}
@@ -152,7 +152,7 @@ func (m *Manager) takeSnapshot(ctx context.Context, t snapTarget, trigger api.Sn
}
n := last.N + 1
commit, err := git.CommitSnapshot(t.dir, tree, git.SnapshotRef(t.taskID, n), fmt.Sprintf("byre snapshot %d (%s)", n, trigger), git.IdentityEnv(t.gitName, t.gitEmail))
commit, err := git.CommitSnapshot(ctx, t.dir, tree, git.SnapshotRef(t.taskID, n), fmt.Sprintf("byre snapshot %d (%s)", n, trigger), git.IdentityEnv(t.gitName, t.gitEmail))
if err != nil {
return nil, err
}
@@ -279,7 +279,7 @@ func (m *Manager) dropSnapshots(repo, taskID string) error {
st.mu.Lock()
defer st.mu.Unlock()
return git.DeleteSnapshotRefs(repo, taskID)
return git.DeleteSnapshotRefs(context.Background(), repo, taskID)
}
func (m *Manager) afterTool(l *live) claude.HookFunc {