Skip to content

Commit 303c1ff

Browse files
committed
More explicit __all__
1 parent 5c47332 commit 303c1ff

File tree

1 file changed

+9
-14
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-openai-agents/src/opentelemetry/instrumentation/openai_agents

1 file changed

+9
-14
lines changed

instrumentation-genai/opentelemetry-instrumentation-openai-agents/src/opentelemetry/instrumentation/openai_agents/__init__.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@
7373
from opentelemetry.semconv.schemas import Schemas
7474
from opentelemetry.trace import get_tracer
7575

76+
__all__ = [
77+
"OpenAIAgentsInstrumentor",
78+
"GenAIProvider",
79+
"GenAIOperationName",
80+
"GenAIToolType",
81+
"GenAIOutputType",
82+
"GenAIEvaluationAttributes",
83+
]
84+
7685
logger = logging.getLogger(__name__)
7786

7887

@@ -81,9 +90,6 @@ class OpenAIAgentsInstrumentor(BaseInstrumentor):
8190

8291
def _instrument(self, **kwargs):
8392
"""Instruments the OpenAI library for agent frameworks."""
84-
# TODO: Implement your instrumentation logic here
85-
# This is a stub implementation - add your custom instrumentation code
86-
8793
tracer_provider = kwargs.get("tracer_provider")
8894
tracer = get_tracer(
8995
__name__,
@@ -106,17 +112,6 @@ def _instrument(self, **kwargs):
106112
)
107113
)
108114

109-
# Expose constants via module attributes for convenience
110-
globals().update(
111-
{
112-
"GenAIProvider": GenAIProvider,
113-
"GenAIOperationName": GenAIOperationName,
114-
"GenAIToolType": GenAIToolType,
115-
"GenAIOutputType": GenAIOutputType,
116-
"GenAIEvaluationAttributes": GenAIEvaluationAttributes,
117-
}
118-
)
119-
120115
def _uninstrument(self, **kwargs):
121116
"""Uninstruments the OpenAI library for agent frameworks."""
122117
# No-op: optional processor registry may not be present.

0 commit comments

Comments
 (0)