The Tracer Provider is the central configuration point for tracing in your application. It owns the Resource, holds the Span Processor pipeline, and hands out Tracer instances on request. It’s a singleton. Set up once during application initialization, then ask it for tracers wherever you need to create spans.Documentation Index
Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Tracer vs Tracer Provider
| Tracer Provider | Tracer | |
|---|---|---|
| What it is | The stateful runtime component that holds references to span processors, exporters, and the resource. | The object used to create spans. |
| How many | Usually one per application (global singleton). | One per library, module, or component — name it after the thing it traces. |
| How you get it | Constructed during app init: TracerProvider(...). | Asked from the provider: trace.get_tracer(__name__). |
| Lifetime | The full process. | Whatever scope you keep the reference. |
tracer.start_as_current_span(...). You can also manage hierarchy manually by explicitly setting the context for spans, but that’s rare. See Context Propagation for the manual path.
Configuring the Tracer Provider
| Parameter | What it controls |
|---|---|
resource | The Resource describing the producer of telemetry. |
active_span_processor | The Span Processor pipeline that handles spans. |
sampler | Which spans get recorded. See Sampling. |
shutdown_on_exit | Whether to automatically flush spans on process exit. |
id_generator | How span IDs and trace IDs are generated. |
span_limits | Caps on attributes, events, links, and attribute length per span. |
Getting a Tracer
Once the provider is registered as the global, ask it for a tracer wherever you need to create spans:__name__ (the Python module name) so spans are tagged with where they came from.
Lambda and Node.js: The Two Critical Gotchas
The Tracer Provider is where two of the most common “no traces” failures live, both rooted in process lifecycle: These same patterns apply to any short-lived execution environment — CI jobs, one-off scripts, serverless functions. If your process doesn’t run long enough for the next batch interval to elapse, you need to flush manually. For the API surface on both methods, see the TracerProvider API reference.How They Compose
The Tracer Provider is what brings the previous components together:register() helper, which handles the wiring for you.