feat(logging): stamp trace and span ids on log records

This commit is contained in:
sam committed 2026-10-25 22:55:57 +11:00
1 parent 29a2a782c9
commit 72f833db09
6 files changed
+53 -6

No files matched your search

+2 -1
View File
@@ -16,6 +16,7 @@ import (
"github.com/samcharles93/archie-core/internal/app/agentworker"
"github.com/samcharles93/archie-core/internal/infrastructure/egress"
"github.com/samcharles93/archie-core/internal/logging"
)
type workerRunner func(context.Context, agentworker.Settings, *slog.Logger) error
@@ -68,7 +69,7 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
return 1
}
log := slog.New(slog.NewJSONHandler(stderr, nil))
log := slog.New(logging.WithTrace(slog.NewJSONHandler(stderr, nil)))
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()