Respan()
Constructor
Parameters
Environment variables
Constructor parameters take precedence over environment variables.
Examples
With OpenAI Agents SDK
With OpenAI SDK
With multiple plugins
With default attributes
Attributes set on the constructor are attached to all spans for the lifetime of the instance:
For per-request attributes, use propagate_attributes() instead.
Minimal setup with env vars
No plugins (decorators only)
flush()
Force flush all pending spans to exporters. Call before process exit or in serverless environments.
shutdown()
Deactivate all plugins and shut down the OTEL pipeline.