nat.plugins.phoenix.phoenix_exporter#
Attributes#
Classes#
Phoenix exporter for AI workflow observability. |
Module Contents#
- logger#
- class PhoenixOtelExporter(
- context_state: nat.builder.context.ContextState | None = None,
- batch_size: int = 100,
- flush_interval: float = 5.0,
- max_queue_size: int = 1000,
- drop_on_overflow: bool = False,
- shutdown_timeout: float = 10.0,
- **phoenix_kwargs,
Bases:
nat.plugins.phoenix.mixin.phoenix_mixin.PhoenixMixin,nat.plugins.opentelemetry.otel_span_exporter.OtelSpanExporterPhoenix exporter for AI workflow observability.
Exports OpenTelemetry-compatible traces to Phoenix for visualization and analysis of AI agent behavior and performance.
Features: - Automatic span conversion from NAT events - Phoenix-specific resource tagging - Project-based trace organization
- Args:
context_state: Execution context for isolation endpoint: Phoenix server endpoint project: Project name for trace grouping batch_size: Batch size for exporting flush_interval: Flush interval for exporting max_queue_size: Maximum queue size for exporting drop_on_overflow: Drop on overflow for exporting shutdown_timeout: Shutdown timeout for exporting
Initialize the OpenTelemetry exporter.
- Args:
context_state: The context state to use for the exporter. batch_size: The batch size for exporting spans. flush_interval: The flush interval in seconds for exporting spans. max_queue_size: The maximum queue size for exporting spans. drop_on_overflow: Whether to drop spans on overflow. shutdown_timeout: The shutdown timeout in seconds. resource_attributes: Additional resource attributes for spans.