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: packages/opentelemetry-instrumentation-openai-agents/opentelemetry/instrumentation/openai_agents/__init__.py
+29-3Lines changed: 29 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,33 @@
15
15
classOpenAIAgentsInstrumentor(BaseInstrumentor):
16
16
"""An instrumentor for OpenAI Agents SDK."""
17
17
18
+
def__init__(self, *, clear: bool=False) ->None:
19
+
"""Initialize the instrumentor.
20
+
21
+
Args:
22
+
clear: Optional bool and default to False.
23
+
If True, existing trace processors are dropped
24
+
and this instrumentor's processor is set as the only one.
25
+
This is useful for replacing the default OpenAI instrumentation
26
+
(enabled by default) with this one.
27
+
"""
28
+
# base class BaseInstrumentor is an ABC without __init__
0 commit comments