Skip to main content
SDK 0.4.0 atlanai SDK can export through a TracerProvider that your application already owns, so its spans and Atlan spans share one pipeline. Use it when OpenTelemetry is set up in your application before tracing is. If you do not own a provider, let init_logger create one.

Before you begin

Before you start, make sure you have:
  • SDK: atlanai SDK installed with tracing, as in Install atlanai SDK.
  • Tracing: init_logger or initLogger configured, as in Trace first agent run.
  • OpenTelemetry: the OpenTelemetry SDK packages for your language installed.
1

Share provider

Python reuses a global SDK TracerProvider that your application registered first. You can also pass it explicitly. OpenTelemetry JS allows only one global provider and does not let another SDK change it later, so in TypeScript you initialize in isolated mode and add the atlanai SDK processor when you construct your provider.
2

Create clients after setup

Initialize one Atlan pipeline per process. Provider instrumentors, framework callbacks, and manual spans share that provider and its single asynchronous exporter, so do not create one Atlan logger per model provider. Create provider and framework clients after this setup. Otherwise they may retain a tracer from a different provider, and their spans do not reach Agent Registry.
3

Verify trace

Run one request, flush, and open the trace in Agent Registry. Confirm the root span, provider calls, tool calls, usage, and parent relationships.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