Log slow API requests with server spans and client timing
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user