Problem
Forge has Langfuse tracing at the LLM-call level, but no single identifier ties together a container spawn, the agent run inside it, the git push, and Jira operations. This makes it hard to correlate logs across components when debugging failures.
Proposed solution
At the start of ContainerRunner.run():
- Generate
run_id = uuid4().hex
- Log it prominently:
logger.info(f"Run ID: {run_id} | container: {container_name} | ticket: {ticket_key}")
- Pass it into the container as
FORGE_RUN_ID env var so container-side logs can reference it
- Include it in Jira comments posted by the worker (e.g. collapsible footer:
run: {run_id})
- Include it in Langfuse trace metadata
Reference
Learned from fullsend: internal/cli/run.go:security.GenerateTraceID() — injected into sandbox, used to correlate pre-scan, sandbox-scan, and output-scan findings under one ID.
Problem
Forge has Langfuse tracing at the LLM-call level, but no single identifier ties together a container spawn, the agent run inside it, the git push, and Jira operations. This makes it hard to correlate logs across components when debugging failures.
Proposed solution
At the start of
ContainerRunner.run():run_id = uuid4().hexlogger.info(f"Run ID: {run_id} | container: {container_name} | ticket: {ticket_key}")FORGE_RUN_IDenv var so container-side logs can reference itrun: {run_id})Reference
Learned from fullsend:
internal/cli/run.go:security.GenerateTraceID()— injected into sandbox, used to correlate pre-scan, sandbox-scan, and output-scan findings under one ID.