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

Method __aenter__

agentops/sdk/decorators/factory.py:76–82  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 pass
75
76 async def __aenter__(self) -> "WrappedClass":
77 if hasattr(self, "_agentops_active_span") and self._agentops_active_span is not None:
78 return self
79 op_name = name or wrapped.__name__
80 self._agentops_span_context_manager = _create_as_current_span(op_name, entity_kind, version)
81 self._agentops_active_span = self._agentops_span_context_manager.__enter__()
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"):

Callers

nothing calls this directly

Calls 2

_create_as_current_spanFunction · 0.90
__enter__Method · 0.45

Tested by

no test coverage detected