You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: temporalio/contrib/openai_agents/README.md
+8-17Lines changed: 8 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
# OpenAI Agents SDK Integration for Temporal
2
2
3
-
⚠️ **Public Preview** - The interface to this module is subject to change prior to General Availability.
4
3
We welcome questions and feedback in the [#python-sdk](https://temporalio.slack.com/archives/CTT84RS0P) Slack channel at [temporalio.slack.com](https://temporalio.slack.com/).
5
4
6
5
## Introduction
@@ -538,29 +537,30 @@ SQLite storage is not suited to a distributed environment.
538
537
539
538
## OpenTelemetry Integration
540
539
540
+
⚠️ **Public Preview** - This functionality is subject to change prior to General Availability.
541
+
541
542
This integration provides seamless export of OpenAI agent telemetry to OpenTelemetry (OTEL) endpoints for observability and monitoring. The integration automatically handles workflow replay semantics, ensuring spans are only exported when workflows actually complete.
542
543
543
544
### Quick Start
544
545
545
546
To enable OTEL telemetry export, you need to set up a global `ReplaySafeTracerProvider` and enable the integration in the `OpenAIAgentsPlugin`:
546
547
547
548
```python
548
-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
549
+
from datetime import timedelta
550
+
from temporalio.client import Client
551
+
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin, ModelActivityParameters
549
552
from temporalio.contrib.opentelemetry import create_tracer_provider
550
553
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
551
554
from opentelemetry import trace
555
+
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
0 commit comments