Span handlers
Bases: BaseModel
, Generic[T]
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
class_name #
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
21 22 23 |
|
span_enter #
span_enter(*args, id: str, **kwargs) -> None
Logic for entering a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
25 26 27 28 29 30 31 32 33 34 35 36 |
|
span_exit #
span_exit(*args, id: str, result: Optional[Any] = None, **kwargs) -> None
Logic for exiting a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
38 39 40 41 42 43 |
|
span_drop #
span_drop(*args, id: str, err: Optional[Exception], **kwargs) -> None
Logic for dropping a span i.e. early exit.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
45 46 47 48 49 50 |
|
new_span
abstractmethod
#
new_span(*args, id: str, parent_span_id: Optional[str], **kwargs) -> Optional[T]
Create a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
52 53 54 55 56 57 |
|
prepare_to_exit_span
abstractmethod
#
prepare_to_exit_span(*args, id: str, result: Optional[Any] = None, **kwargs) -> Any
Logic for preparing to exit a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
59 60 61 62 63 64 |
|
prepare_to_drop_span
abstractmethod
#
prepare_to_drop_span(*args, id: str, err: Optional[Exception], **kwargs) -> Any
Logic for preparing to drop a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/base.py
66 67 68 69 70 71 |
|
Bases: BaseSpanHandler[SimpleSpan]
Span Handler that managest SimpleSpan's.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/simple.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
class_name #
class_name() -> str
Class name.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/simple.py
19 20 21 |
|
new_span #
new_span(*args, id: str, parent_span_id: Optional[str], **kwargs) -> SimpleSpan
Create a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/simple.py
23 24 25 26 27 |
|
prepare_to_exit_span #
prepare_to_exit_span(*args, id: str, result: Optional[Any] = None, **kwargs) -> None
Logic for preparing to drop a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/simple.py
29 30 31 32 33 34 35 36 37 |
|
prepare_to_drop_span #
prepare_to_drop_span(*args, id: str, err: Optional[Exception], **kwargs) -> None
Logic for droppping a span.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/simple.py
39 40 41 42 43 44 |
|
print_trace_trees #
print_trace_trees() -> None
Method for viewing trace trees.
Source code in llama-index-core/llama_index/core/instrumentation/span_handlers/simple.py
96 97 98 99 100 101 |
|