Log slow API requests with server spans and client timing
This commit is contained in:
@@ -161,7 +161,7 @@ func (m *Manager) ask(ctx context.Context, l *live, raw json.RawMessage) (string
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
behind, err := git.Behind(task.WorktreePath, project.DefaultBranch)
|
||||
behind, err := git.Behind(ctx, task.WorktreePath, project.DefaultBranch)
|
||||
if err != nil {
|
||||
slog.Error("count commits behind default branch", "task", task.Id, "err", err)
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func (m *Manager) ask(ctx context.Context, l *live, raw json.RawMessage) (string
|
||||
func (m *Manager) commitBeforeSync(ctx context.Context, l *live, branch string) error {
|
||||
unlock := m.lockTask(l.taskID)
|
||||
defer unlock()
|
||||
_, err := git.CommitAll(l.dir, "Work before merging "+branch, l.gitName, l.gitEmail)
|
||||
_, err := git.CommitAll(ctx, l.dir, "Work before merging "+branch, l.gitName, l.gitEmail)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user