(self, *args: Any, **kwargs: Any)
| 56 | # For SpanKind.SESSION, this creates a span for __init__ or async context, not instance lifetime. |
| 57 | class WrappedClass(wrapped): |
| 58 | def __init__(self, *args: Any, **kwargs: Any): |
| 59 | op_name = name or wrapped.__name__ |
| 60 | self._agentops_span_context_manager = _create_as_current_span(op_name, entity_kind, version) |
| 61 | self._agentops_active_span = self._agentops_span_context_manager.__enter__() |
| 62 | try: |
| 63 | _record_entity_input(self._agentops_active_span, args, kwargs) |
| 64 | except Exception as e: |
| 65 | logger.warning(f"Failed to record entity input for class {op_name}: {e}") |
| 66 | super().__init__(*args, **kwargs) |
| 67 | |
| 68 | def __del__(self): |
| 69 | """Ensure span is properly ended when object is destroyed.""" |
nothing calls this directly
no test coverage detected