logging: pass request context to slog so trace ids reach log lines #257

Closed
opened 2026-10-27 13:35:35 +00:00 by sam · 0 comments
Owner

fzb3x.1 stamps trace_id/span_id only for records logged with a context, but nothing in the tree calls slog's *Context methods, so no log line carries ids even with tracing on. Switch request-path log calls (RPC handlers, HTTP handlers, task and workflow execution) to InfoContext/ErrorContext etc. with the request ctx.

Acceptance criteria

With an exporter configured, a dashboard request and a task run produce log lines carrying the trace_id of their trace in the file log and dashboard log viewer, including container logs relayed over NATS.

Close reason

All slog calls with a ctx in scope use the *Context methods; sloglint context: scope enforces it


Imported from beads archie-core-fzb3x.5 · GitHub #1893 · type task · priority P2 · created 2026-10-25 · closed 2026-10-25

fzb3x.1 stamps trace_id/span_id only for records logged with a context, but nothing in the tree calls slog's *Context methods, so no log line carries ids even with tracing on. Switch request-path log calls (RPC handlers, HTTP handlers, task and workflow execution) to InfoContext/ErrorContext etc. with the request ctx. ### Acceptance criteria With an exporter configured, a dashboard request and a task run produce log lines carrying the trace_id of their trace in the file log and dashboard log viewer, including container logs relayed over NATS. ### Close reason All slog calls with a ctx in scope use the *Context methods; sloglint context: scope enforces it --- _Imported from beads `archie-core-fzb3x.5` · GitHub #1893 · type task · priority P2 · created 2026-10-25 · closed 2026-10-25_
sam added the mediumtask labels 2026-10-27 13:35:35 +00:00
sam self-assigned this 2026-10-27 13:35:35 +00:00
sam closed this issue 2026-10-27 13:35:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#257