Skip to main content
SDK 0.4.0 observe in atlanai SDK traces a function without restructuring it, and handles sync functions, async functions, and generators. Use it when you want a span per function call with input and output captured automatically. To control the span yourself, use Create spans for agent run.

Before you begin

Before you start, make sure you have:
1

Wrap function

Decorate a function in Python, or wrap it in TypeScript. The span name comes from the function unless you set name, and the observation type defaults to task.
2

Limit captured payload

Input and output are captured by default. Turn either off per function when the payload is large or sensitive.
For one rule across every span, use trace_content instead, as in Control trace privacy.
3

Verify span

Call the function, flush, and open the trace in Agent Registry. Confirm a span named for the function with the expected type, and input and output present unless you turned them off.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