Skip to content

How can I trace one generation action across web requests, queues and background delivery?

Carry a safe application action identity across request handling, queue delivery and background processing, with trace context for diagnostic relationships. Keep the durable task ledger authoritative because traces may be sampled or expire. Do not place private prompts, bearer keys or media URLs in trace identifiers or propagated baggage.

PRESERVE API DATA ACCURATELYAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Separate identities; Propagate selectively; Test a cross-process path.
Workflow diagram: Separate identities → Propagate selectively → Test a cross-process path. Read the article for evidence and limits.

An asynchronous action spans processes

One web request may only save a command, while later workers dispatch, observe and copy the result. A single HTTP request ID cannot explain that whole lifetime. Correlation needs both durable business identity and appropriately scoped telemetry context.

What to do next

  1. 01

    Separate identities

    Use action and task IDs for durable business association, and trace/span IDs for diagnostic execution paths. Store their relationship where useful, but never depend on a sampled trace to recover the only copy of a remote job identity.

  2. 02

    Propagate selectively

    Carry reviewed trace context through your queue envelope and create spans or links appropriate to asynchronous work. Validate inbound context and avoid attaching free-text prompts or sensitive customer attributes merely to make traces searchable.

  3. 03

    Test a cross-process path

    Follow a synthetic action from frontend command receipt through dispatch and delivery. Confirm operators can join the relevant stages while unauthorized telemetry consumers cannot see private content or use identifiers as access credentials.

A concrete example

Illustrative example: action A17 creates one web span and later several worker spans. Operators find them by A17, while the task database retains recovery evidence even if some spans were sampled out.

Before you call it ready

  • Business identities survive trace sampling.
  • Propagated context contains no creative payload.
  • Asynchronous stages remain correlatable.

When to stop or choose another method

Stop using trace retention as your recovery ledger or embedding secret-bearing URLs in diagnostic context.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation