123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- import SvgIcon from 'sentry/icons/svgIcon';
- import {Color} from 'sentry/utils/theme';
- export type IconProps = React.ComponentProps<typeof SvgIcon>;
- export enum BreadcrumbLevelType {
- FATAL = 'fatal',
- ERROR = 'error',
- WARNING = 'warning',
- INFO = 'info',
- DEBUG = 'debug',
- UNDEFINED = 'undefined',
- }
- export enum BreadcrumbType {
- INFO = 'info',
- DEBUG = 'debug',
- MESSAGE = 'message',
- QUERY = 'query',
- UI = 'ui',
- USER = 'user',
- EXCEPTION = 'exception',
- WARNING = 'warning',
- ERROR = 'error',
- DEFAULT = 'default',
- HTTP = 'http',
- NAVIGATION = 'navigation',
- SYSTEM = 'system',
- SESSION = 'session',
- TRANSACTION = 'transaction',
- }
- type BreadcrumbTypeBase = {
- level: BreadcrumbLevelType;
- // it's recommended
- category?: string | null;
- event_id?: string;
- message?: string;
- timestamp?: string;
- };
- export type BreadcrumbTypeSystem = {
- action: string;
- extras: Record<string, any>;
- type: BreadcrumbType.SYSTEM;
- } & BreadcrumbTypeBase;
- export type BreadcrumbTypeSession = {
- action: string;
- extras: Record<string, any>;
- type: BreadcrumbType.SESSION;
- } & BreadcrumbTypeBase;
- export type BreadcrumbTypeNavigation = {
- type: BreadcrumbType.NAVIGATION;
- data?: {
- from?: string;
- to?: string;
- };
- } & BreadcrumbTypeBase;
- export type BreadcrumbTypeHTTP = {
- type: BreadcrumbType.HTTP;
- data?: {
- method?:
- | 'POST'
- | 'PUT'
- | 'GET'
- | 'HEAD'
- | 'DELETE'
- | 'CONNECT'
- | 'OPTIONS'
- | 'TRACE'
- | 'PATCH';
- reason?: string;
- status_code?: number;
- url?: string;
- };
- } & BreadcrumbTypeBase;
- export type BreadcrumbTypeDefault = {
- type:
- | BreadcrumbType.INFO
- | BreadcrumbType.DEBUG
- | BreadcrumbType.QUERY
- | BreadcrumbType.UI
- | BreadcrumbType.USER
- | BreadcrumbType.EXCEPTION
- | BreadcrumbType.WARNING
- | BreadcrumbType.ERROR
- | BreadcrumbType.DEFAULT
- | BreadcrumbType.SESSION
- | BreadcrumbType.SYSTEM
- | BreadcrumbType.SESSION
- | BreadcrumbType.TRANSACTION;
- data?: Record<string, any>;
- } & BreadcrumbTypeBase;
- export type RawCrumb =
- | BreadcrumbTypeNavigation
- | BreadcrumbTypeHTTP
- | BreadcrumbTypeDefault;
- export type Crumb = RawCrumb & {
- color: Color;
- description: string;
- id: number;
- };
|