deep.api.tracepoint.eventsnapshot
Types for the captured data.
WATCH_SOURCE_CAPTURE = 'CAPTURE'
module-attribute
Watch source for captured data.
WATCH_SOURCE_LOG = 'LOG'
module-attribute
Watch source for log expressions.
WATCH_SOURCE_METRIC = 'METRIC'
module-attribute
Watch source for metric expressions.
WATCH_SOURCE_WATCH = 'WATCH'
module-attribute
Watch source for user watch statements.
EventSnapshot
This is the model for the snapshot that is uploaded to the services.
Source code in deep/api/tracepoint/eventsnapshot.py
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
attributes: BoundedAttributes
property
The snapshot attributes.
duration_nanos
property
The duration in nanoseconds.
frames
property
The captured frames.
id
property
The id of this snapshot.
id_str
property
The id of this snapshot.
log_msg
property
writable
Get the processed log message.
resource
property
The client resource information.
tracepoint
property
The tracepoint that triggered this snapshot.
ts_nanos
property
The time in nanoseconds, this snapshot was triggered.
var_lookup
property
The captured var lookup.
watches
property
The watch results.
__init__(tracepoint, ts, resource, frames, var_lookup)
Create a new snapshot object.
:param tracepoint: the tracepoint object :param ts: the time in nanoseconds :param resource: the client resource :param frames: the captured frames :param var_lookup: the captured variables.
Source code in deep/api/tracepoint/eventsnapshot.py
__repr__()
__str__()
add_watch_result(watch_result)
Append a watch result to the snapshot.
:param watch_result: the result to append. :return:
complete()
merge_var_lookup(lookup)
Merge additional variables into the var lookup.
:param lookup: the values to merge
StackFrame
This represents a frame of code that is being executed.
Source code in deep/api/tracepoint/eventsnapshot.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
|
app_frame
property
Is this frame in the user app.
class_name
property
The class name.
column_number
property
The column number.
file_name
property
The full file path.
is_async
property
Is the frame an async frame.
line_number
property
The line number.
method_name
property
The method name.
short_path
property
The short file path.
transpiled_column_number
property
The transpiled column number.
transpiled_file_name
property
The transpiled file name.
transpiled_line_number
property
The transpiled line number.
variables
property
Variables captured on this frame.
__init__(file_name, short_path, method_name, line_number, variables, class_name, is_async=False, column_number=0, transpiled_file_name=None, transpiled_line_number=0, transpiled_column_number=0, app_frame=False)
Create a new StackFrame object.
:param file_name: The full file path :param short_path: The short file path :param method_name: The method name :param line_number: The line number :param variables: Variables captured on this frame :param class_name: The class name :param is_async: Is the frame an async frame :param column_number: The column number :param transpiled_file_name: The transpiled file name :param transpiled_line_number: The transpiled line number :param transpiled_column_number: The transpiled column number :param app_frame: Is this frame in the user app
Source code in deep/api/tracepoint/eventsnapshot.py
__repr__()
Variable
This represents a captured variable value.
Source code in deep/api/tracepoint/eventsnapshot.py
children: List[VariableId]
property
The children of this value.
hash
property
The identity hash of this value.
truncated
property
Is the string value truncated.
type
property
The type of this value.
value
property
The string value of variable.
__init__(var_type, value, var_hash, children, truncated)
Create a new Variable object.
:param var_type: the type of the variable. :param value: the value as a string :param var_hash: the identity hash of the value :param children: list of child VariableIds :param truncated: is the value string truncated.
Source code in deep/api/tracepoint/eventsnapshot.py
__repr__()
VariableId
This represents a variable id, that is used for de duplication.
A VariableID is a pointer to a reference within the var lookup of the snapshot. Each VariableID can have different names and modifiers, but point to the same value.
e.g. val = "Ben" name = val
Both 'val' and 'name' have the value 'Ben' to prevent duplication of this in the var lookup, we use the VariableId to point to the value using the vid property.
Source code in deep/api/tracepoint/eventsnapshot.py
modifiers
property
Get variable modifiers.
name
property
Get variable name.
original_name
property
Get variable original name.
vid
property
Get variable id.
__eq__(o)
Check if the variable id matches.
Source code in deep/api/tracepoint/eventsnapshot.py
__init__(vid, name, modifiers=None, original_name=None)
Create a new variable object.
:param vid: the variable id :param name: the variable name :param modifiers: the variable modifiers :param original_name: the original name
Source code in deep/api/tracepoint/eventsnapshot.py
__repr__()
WatchResult
This is the result of a watch expression.
Source code in deep/api/tracepoint/eventsnapshot.py
error: Optional[str]
property
The error.
expression: str
property
The watch expression.
result: Optional[VariableId]
property
The good result.
source
property
The watch source.
__init__(source, expression, result, error=None)
Create new watch result.
:param source: the watch source :param expression: the expression used :param result: the result of the expression :param error: the error captured during execution