|
1 |
| -/** JSDoc */ |
| 1 | +/** |
| 2 | + * @external https://develop.sentry.dev/sdk/event-payloads/stacktrace/#frame-attributes |
| 3 | + */ |
2 | 4 | export interface StackFrame {
|
| 5 | + /** |
| 6 | + * The path to the source file relative to the project root directory. |
| 7 | + * The value should not make file names indistinguishable and should only change between releases for files that were actually renamed. |
| 8 | + * In some SDKs, this is implemented as the path relative to a certain entry point relevant to the language/platform. |
| 9 | + */ |
3 | 10 | filename?: string;
|
| 11 | + |
| 12 | + /** |
| 13 | + * The name of the function being called. |
| 14 | + * This function name may be shortened or demangled. If not, Sentry will demangle and shorten it. |
| 15 | + * The original function name will be stored in rawFunction. |
| 16 | + */ |
4 | 17 | function?: string;
|
| 18 | + |
| 19 | + /** |
| 20 | + * The original function name, if the function name is shortened or demangled. |
| 21 | + * Sentry shows the raw function when clicking on the shortened one in the UI. |
| 22 | + */ |
| 23 | + raw_function?: string; |
| 24 | + |
| 25 | + /** |
| 26 | + * Platform-specific module path (e.g. sentry.interfaces.Stacktrace). |
| 27 | + */ |
5 | 28 | module?: string;
|
6 |
| - platform?: string; |
| 29 | + |
| 30 | + /** |
| 31 | + * The line number of the call, starting at 1. |
| 32 | + */ |
7 | 33 | lineno?: number;
|
| 34 | + |
| 35 | + /** |
| 36 | + * The column number of the call, starting at 1. |
| 37 | + */ |
8 | 38 | colno?: number;
|
| 39 | + |
| 40 | + /** |
| 41 | + * The absolute path to the source file. |
| 42 | + */ |
9 | 43 | abs_path?: string;
|
| 44 | + |
| 45 | + /** |
| 46 | + * Source code in filename at lineno. |
| 47 | + */ |
10 | 48 | context_line?: string;
|
| 49 | + |
| 50 | + /** |
| 51 | + * A list of source code lines before context_line (in order) – |
| 52 | + * usually [lineno - 5:lineno]. |
| 53 | + */ |
11 | 54 | pre_context?: string[];
|
| 55 | + |
| 56 | + /** |
| 57 | + * A list of source code lines after context_line (in order) – |
| 58 | + * usually [lineno + 1:lineno + 5]. |
| 59 | + */ |
12 | 60 | post_context?: string[];
|
| 61 | + |
| 62 | + /** |
| 63 | + * Signals whether this frame is related to the execution of the relevant code in this stack trace. |
| 64 | + * For example, the frames that might power the framework’s web server of your app are probably not relevant. |
| 65 | + * However, calls to the framework’s library once you start handling code likely are relevant. |
| 66 | + */ |
13 | 67 | in_app?: boolean;
|
| 68 | + |
| 69 | + /** |
| 70 | + * A mapping of variables which were available within this frame (usually context-locals). |
| 71 | + */ |
| 72 | + vars?: Record<string, unknown>; |
| 73 | + |
| 74 | + /** |
| 75 | + * An instruction address for symbolication. |
| 76 | + * This should be a string with a hexadecimal number that includes a 0x prefix. |
| 77 | + * If this is set and a known image is defined in the Debug Meta Interface, |
| 78 | + * then symbolication can take place. |
| 79 | + * Note that the addr_mode attribute can control the behavior of this address. |
| 80 | + */ |
14 | 81 | instruction_addr?: string;
|
| 82 | + |
| 83 | + /** |
| 84 | + * Optionally changes the addressing mode. |
| 85 | + * The default value is the same as "abs" which means absolute referencing. |
| 86 | + * This can also be set to "rel:DEBUG_ID" or "rel:IMAGE_INDEX" to make addresses relative to an object referenced by debug id or index. |
| 87 | + * This for instance is necessary for WASM processing as WASM does not use a unified address space. |
| 88 | + */ |
15 | 89 | addr_mode?: string;
|
16 |
| - vars?: { [key: string]: any }; |
| 90 | + |
| 91 | + /** |
| 92 | + * An address that points to a symbol. |
| 93 | + * We use the instruction address for symbolication, |
| 94 | + * but this can be used to calculate an instruction offset automatically. |
| 95 | + * Note that the addr_mode attribute can control the behavior of this address. |
| 96 | + */ |
| 97 | + symbol_addr?: string; |
| 98 | + |
| 99 | + /** |
| 100 | + * An address of the debug image to reference. |
| 101 | + */ |
| 102 | + image_addr?: string; |
| 103 | + |
| 104 | + /** |
| 105 | + * The "package" the frame was contained in. |
| 106 | + * Depending on the platform, this can be different things. |
| 107 | + */ |
| 108 | + package?: string; |
| 109 | + |
| 110 | + /** |
| 111 | + * This can override the platform for a single frame. |
| 112 | + * Otherwise, the platform of the event is assumed. |
| 113 | + * This can be used for multi-platform stack traces, such as in React Native. |
| 114 | + */ |
| 115 | + platform?: string; |
17 | 116 | }
|
0 commit comments