|
1 | 1 | import type { SeverityLevel } from './severity';
|
2 | 2 |
|
3 |
| -/** JSDoc */ |
| 3 | +/** |
| 4 | + * Sentry uses breadcrumbs to create a trail of events that happened prior to an issue. |
| 5 | + * These events are very similar to traditional logs but can record more rich structured data. |
| 6 | + * |
| 7 | + * @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/ |
| 8 | + */ |
4 | 9 | export interface Breadcrumb {
|
| 10 | + /** |
| 11 | + * By default, all breadcrumbs are recorded as default, which makes them appear as a Debug entry, but Sentry provides |
| 12 | + * other types that influence how the breadcrumbs are rendered. For more information, see the description of |
| 13 | + * recognized breadcrumb types. |
| 14 | + * |
| 15 | + * @summary The type of breadcrumb. |
| 16 | + * @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types |
| 17 | + */ |
5 | 18 | type?: string;
|
| 19 | + |
| 20 | + /** |
| 21 | + * Allowed values are, from highest to lowest: |
| 22 | + * `fatal`, `error`, `warning`, `info`, and `debug`. |
| 23 | + * Levels are used in the UI to emphasize and deemphasize the crumb. The default is `info`. |
| 24 | + * |
| 25 | + * @summary This defines the severity level of the breadcrumb. |
| 26 | + */ |
6 | 27 | level?: SeverityLevel;
|
| 28 | + |
7 | 29 | event_id?: string;
|
| 30 | + |
| 31 | + /** |
| 32 | + * Typically it is a module name or a descriptive string. For instance, `ui.click` could be used to |
| 33 | + * indicate that a click happened in the UI or flask could be used to indicate that the event originated in |
| 34 | + * the Flask framework. |
| 35 | + * @private Internally we render some crumbs' color and icon based on the provided category. |
| 36 | + * For more information, see the description of recognized breadcrumb types. |
<
8000
/code> | 37 | + * @summary A dotted string indicating what the crumb is or from where it comes. |
| 38 | + * @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types |
| 39 | + */ |
8 | 40 | category?: string;
|
| 41 | + |
| 42 | + /** |
| 43 | + * If a message is provided, it is rendered as text with all whitespace preserved. |
| 44 | + * |
| 45 | + * @summary Human-readable message for the breadcrumb. |
| 46 | + */ |
9 | 47 | message?: string;
|
| 48 | + |
| 49 | + /** |
| 50 | + * Contains a dictionary whose contents depend on the breadcrumb type. |
| 51 | + * Additional parameters that are unsupported by the type are rendered as a key/value table. |
| 52 | + * |
| 53 | + * @summary Arbitrary data associated with this breadcrumb. |
| 54 | + */ |
10 | 55 | data?: { [key: string]: any };
|
| 56 | + |
| 57 | + /** |
| 58 | + * The format is a numeric (integer or float) value representing |
| 59 | + * the number of seconds that have elapsed since the Unixepoch. |
| 60 | + * Breadcrumbs are most useful when they include a timestamp, as it creates a timeline |
| 61 | + * leading up to an event expection/error. |
| 62 | + * |
| 63 | + * @note The API supports a string as defined in RFC 3339, but the SDKs only support a numeric value for now. |
| 64 | + * |
| 65 | + * @summary A timestamp representing when the breadcrumb occurred. |
| 66 | + * @link https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#:~:text=is%20info.-,timestamp,-(recommended) |
| 67 | + */ |
11 | 68 | timestamp?: number;
|
12 | 69 | }
|
13 | 70 |
|
|
0 commit comments