Skip to main content
SDK 0.4.0 create_trace_id in atlanai SDK derives a trace ID from a stable external key. Use it when a run starts from something that already has an ID, such as a webhook, a ticket, or a queue message, so retries and multi-service handling land on one trace. The same seed always gives the same ID in Python and TypeScript.

Before you begin

Before you start, make sure you have:
1

Derive trace ID

Pass the external key as the seed.
On a runtime without Node crypto, use createTraceIdAsync.
2

Start root span with trace ID

Pass the ID in the trace context of the root span.
The derivation is Langfuse-compatible, so a run already keyed by seed in Langfuse keeps the same trace ID here.
3

Verify trace ID

Run the handler twice with the same key, flush, and open the trace in Agent Registry. Confirm both runs appear under one trace ID instead of two traces.If no trace appears, see init() disables tracing and no traces are exported.

Troubleshooting

If traces do not appear, see Install and setup errors.

Next steps

  • Add scores: attach evaluation results to the trace.

See also