Document the trace context that step processes receive

Merged
SC
8d ago
+35-18

Documents dagucloud/dagu#3216 (feature request dagucloud/dagu#3206): when OpenTelemetry is enabled for a DAG, each step process gets the W3C trace context of its step span in TRACEPARENT and TRACESTATE.

  • server-admin/opentelemetry.md: a "Step Processes" section under "Trace Context Propagation", with an example that forwards the context to an HTTP service and the precedence rules (step env wins, an empty value clears it, a DAG-level value is replaced, handlers get nothing). One line in the overview list.
  • writing-workflows/runtime-variables.md: TRACEPARENT and TRACESTATE rows in the environment variable reference.

Please merge after dagucloud/dagu#3216. node scripts/validate-examples.mjs passes with a binary built from that branch (913 examples).


Summary by cubic

Documents the trace context that step processes receive (dagucloud/dagu#3206): when OpenTelemetry is enabled for a DAG, each step process gets the W3C trace context of its step span in TRACEPARENT and TRACESTATE. The step trace context docs are consolidated into a "Step Processes" section in server-admin/opentelemetry.md with an example that forwards the context to an HTTP service and the precedence rules (step env wins, an empty value clears it, a DAG-level value is replaced, handlers receive nothing). Also updates the runtime variable reference in writing-workflows/runtime-variables.md and the link in writing-workflows/yaml-specification.md.

Merge after dagucloud/dagu#3216, which ships the behavior.

Summary by CodeRabbit

  • Documentation
    • Clarified how step processes receive TRACEPARENT and TRACESTATE when OpenTelemetry tracing is enabled, including when these variables are available and how step, container, and DAG environment values affect them.
    • Added TRACEPARENT and TRACESTATE to the runtime-variable reference.
    • Updated the YAML specification to link to the relevant step-process tracing documentation.