MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / __aexit__

Method __aexit__

agentops/sdk/decorators/factory.py:84–92  ·  view source on GitHub ↗
(self, exc_type: Any, exc_val: Any, exc_tb: Any)

Source from the content-addressed store, hash-verified

82 return self
83
84 async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
85 if hasattr(self, "_agentops_active_span") and hasattr(self, "_agentops_span_context_manager"):
86 try:
87 _record_entity_output(self._agentops_active_span, self)
88 except Exception as e:
89 logger.warning(f"Failed to record entity output for class instance: {e}")
90 self._agentops_span_context_manager.__exit__(exc_type, exc_val, exc_tb)
91 self._agentops_span_context_manager = None
92 self._agentops_active_span = None
93
94 WrappedClass.__name__ = wrapped.__name__
95 WrappedClass.__qualname__ = wrapped.__qualname__

Callers

nothing calls this directly

Calls 2

_record_entity_outputFunction · 0.90
__exit__Method · 0.45

Tested by

no test coverage detected