Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI
Python agentagentopsagents-sdkaianthropicautogencost-estimationcrewaievalsevaluation-metricsgroqlangchainllmmistralollamaopenaiopenai-agents
refactor: Update instrumentation manager usage and improve tracer provider access (#1054)
Dwij69088b22db6f
diff --git a/agentops/instrumentation/__init__.py b/agentops/instrumentation/__init__.pyindex 96966a8a..cb4a6b88 100644--- a/agentops/instrumentation/__init__.py+++ b/agentops/instrumentation/__init__.py@@ -390,9 +390,6 @@ AGENTIC_LIBRARIES: dict[str, InstrumentorConfig] = {# Combine all target packages for monitoringTARGET_PACKAGES = set(PROVIDERS.keys()) | set(AGENTIC_LIBRARIES.keys())-# Create a single instance of the manager-# _manager = InstrumentationManager() # Removed-@dataclassclass InstrumentorLoader:@@ -444,7 +441,8 @@ def instrument_one(loader: InstrumentorLoader) -> Optional[BaseInstrumentor]:instrumentor = loader.get_instance()try:- instrumentor.instrument(tracer_provider=tracer._provider)+ # Use the provider directly from the global tracer instance+ instrumentor.instrument(tracer_provider=tracer.provider)logger.info(f"AgentOps: Successfully instrumented '{loader.class_name}' for package '{loader.package_name or loader.module_name}'.")