Log slow API requests with server spans and client timing
This commit is contained in:
@@ -6,13 +6,13 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Ignored(worktree string, paths []string) (map[string]bool, error) {
|
||||
func Ignored(ctx context.Context, worktree string, paths []string) (map[string]bool, error) {
|
||||
ignored := map[string]bool{}
|
||||
if len(paths) == 0 {
|
||||
return ignored, nil
|
||||
}
|
||||
|
||||
out, stderr, code, err := runCodeInput(context.Background(), worktree, nil, strings.NewReader(strings.Join(paths, "\x00")+"\x00"), "check-ignore", "--stdin", "-z")
|
||||
out, stderr, code, err := runCodeInput(context.WithoutCancel(ctx), worktree, nil, strings.NewReader(strings.Join(paths, "\x00")+"\x00"), "check-ignore", "--stdin", "-z")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user