Skip to main content
SDK 0.6.0 propagate_attributes in atlanai SDK stamps association attributes onto every span started in its scope, including spans from third-party instrumentation you do not control. Use it to group traces into one session in Atlan Trident and to attach a user, tags, or display name. To set the trace ID itself, use Set deterministic trace ID.

Before you begin

Before you start, make sure you have:
1

Wrap run in propagation scope

Run the agent inside the scope. Python arguments are keyword-only.
external_session_id groups traces into one session. session_id is a compatibility alias: a valid external_session_id takes precedence when both are supplied, and when you pass neither, each trace root defaults to its trace ID as the session. trace_name overrides the trace display name, which helps when the root span name is generic but the run has a meaningful external label. visitor_id attaches a visitor identity. Use a stable pseudonymous ID for user_id, not an email address.
2

Verify attributes

Flush, then open the trace in Atlan Trident. Confirm every span, including framework spans, carries the session, user, and tags, and that the run appears under the session. With ATLAN_AGENT_ID set, the session lists the run’s model calls as its turns.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

See also