123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872 |
- import type {
- AggregateSpanType,
- MetricsSummary,
- RawSpanType,
- TraceContextType,
- } from 'sentry/components/events/interfaces/spans/types';
- import type {SymbolicatorStatus} from 'sentry/components/events/interfaces/types';
- import type {IssueType, PlatformKey} from 'sentry/types';
- import type {RawCrumb} from './breadcrumbs';
- import type {Image} from './debugImage';
- import type {IssueAttachment, IssueCategory} from './group';
- import type {Release} from './release';
- import type {RawStacktrace, StackTraceMechanism, StacktraceType} from './stacktrace';
- export type Level = 'error' | 'fatal' | 'info' | 'warning' | 'sample' | 'unknown';
- /**
- * Grouping Configuration.
- */
- export type EventGroupComponent = {
- contributes: boolean;
- hint: string | null;
- id: string;
- name: string | null;
- values: EventGroupComponent[] | string[];
- };
- export type EventGroupingConfig = {
- base: string | null;
- changelog: string;
- delegates: string[];
- hidden: boolean;
- id: string;
- latest: boolean;
- risk: number;
- strategies: string[];
- };
- export type VariantEvidence = {
- desc: string;
- fingerprint: string;
- cause_span_hashes?: string[];
- cause_span_ids?: string[];
- offender_span_hashes?: string[];
- offender_span_ids?: string[];
- op?: string;
- parent_span_hashes?: string[];
- parent_span_ids?: string[];
- };
- type EventGroupVariantKey =
- | 'built-in-fingerprint'
- | 'custom-fingerprint'
- | 'app'
- | 'default'
- | 'system';
- export enum EventGroupVariantType {
- CHECKSUM = 'checksum',
- FALLBACK = 'fallback',
- CUSTOM_FINGERPRINT = 'custom-fingerprint',
- BUILT_IN_FINGERPRINT = 'built-in-fingerprint',
- COMPONENT = 'component',
- SALTED_COMPONENT = 'salted-component',
- PERFORMANCE_PROBLEM = 'performance-problem',
- }
- interface BaseVariant {
- description: string | null;
- hash: string | null;
- hashMismatch: boolean;
- key: string;
- type: string;
- }
- interface FallbackVariant extends BaseVariant {
- type: EventGroupVariantType.FALLBACK;
- }
- interface ChecksumVariant extends BaseVariant {
- type: EventGroupVariantType.CHECKSUM;
- }
- interface HasComponentGrouping {
- client_values?: Array<string>;
- component?: EventGroupComponent;
- config?: EventGroupingConfig;
- matched_rule?: string;
- values?: Array<string>;
- }
- interface ComponentVariant extends BaseVariant, HasComponentGrouping {
- type: EventGroupVariantType.COMPONENT;
- }
- interface CustomFingerprintVariant extends BaseVariant, HasComponentGrouping {
- type: EventGroupVariantType.CUSTOM_FINGERPRINT;
- }
- interface BuiltInFingerprintVariant extends BaseVariant, HasComponentGrouping {
- type: EventGroupVariantType.BUILT_IN_FINGERPRINT;
- }
- interface SaltedComponentVariant extends BaseVariant, HasComponentGrouping {
- type: EventGroupVariantType.SALTED_COMPONENT;
- }
- interface PerformanceProblemVariant extends BaseVariant {
- evidence: VariantEvidence;
- type: EventGroupVariantType.PERFORMANCE_PROBLEM;
- }
- export type EventGroupVariant =
- | FallbackVariant
- | ChecksumVariant
- | ComponentVariant
- | SaltedComponentVariant
- | CustomFingerprintVariant
- | BuiltInFingerprintVariant
- | PerformanceProblemVariant;
- export type EventGroupInfo = Record<EventGroupVariantKey, EventGroupVariant>;
- /**
- * SDK Update metadata
- */
- type EnableIntegrationSuggestion = {
- enables: Array<SDKUpdatesSuggestion>;
- integrationName: string;
- type: 'enableIntegration';
- integrationUrl?: string | null;
- };
- export type UpdateSdkSuggestion = {
- enables: Array<SDKUpdatesSuggestion>;
- newSdkVersion: string;
- sdkName: string;
- type: 'updateSdk';
- sdkUrl?: string | null;
- };
- type ChangeSdkSuggestion = {
- enables: Array<SDKUpdatesSuggestion>;
- newSdkName: string;
- type: 'changeSdk';
- sdkUrl?: string | null;
- };
- export type SDKUpdatesSuggestion =
- | EnableIntegrationSuggestion
- | UpdateSdkSuggestion
- | ChangeSdkSuggestion;
- /**
- * Frames, Threads and Event interfaces.
- */
- export interface Thread {
- crashed: boolean;
- current: boolean;
- id: number;
- rawStacktrace: RawStacktrace;
- stacktrace: StacktraceType | null;
- heldLocks?: Record<string, Lock> | null;
- name?: string | null;
- state?: string | null;
- }
- export type Lock = {
- type: LockType;
- address?: string | null;
- class_name?: string | null;
- package_name?: string | null;
- thread_id?: number | null;
- };
- export enum LockType {
- LOCKED = 1,
- WAITING = 2,
- SLEEPING = 4,
- BLOCKED = 8,
- }
- export type Frame = {
- absPath: string | null;
- colNo: number | null;
- context: Array<[number, string]>;
- filename: string | null;
- function: string | null;
- inApp: boolean;
- instructionAddr: string | null;
- lineNo: number | null;
- module: string | null;
- package: string | null;
- platform: PlatformKey | null;
- rawFunction: string | null;
- symbol: string | null;
- symbolAddr: string | null;
- trust: any | null;
- vars: Record<string, any> | null;
- addrMode?: string;
- isPrefix?: boolean;
- isSentinel?: boolean;
- lock?: Lock | null;
- // map exists if the frame has a source map
- map?: string | null;
- mapUrl?: string | null;
- minGroupingLevel?: number;
- origAbsPath?: string | null;
- sourceLink?: string | null;
- symbolicatorStatus?: SymbolicatorStatus;
- };
- export enum FrameBadge {
- SENTINEL = 'sentinel',
- PREFIX = 'prefix',
- GROUPING = 'grouping',
- }
- export type ExceptionValue = {
- mechanism: StackTraceMechanism | null;
- module: string | null;
- rawStacktrace: RawStacktrace;
- stacktrace: StacktraceType | null;
- threadId: number | null;
- type: string;
- value: string;
- frames?: Frame[] | null;
- };
- export type ExceptionType = {
- excOmitted: any | null;
- hasSystemFrames: boolean;
- values?: Array<ExceptionValue>;
- };
- export type TreeLabelPart =
- | string
- | {
- classbase?: string;
- datapath?: (string | number)[];
- filebase?: string;
- function?: string;
- is_prefix?: boolean;
- // is_sentinel is no longer being used,
- // but we will still assess whether we will use this property in the near future.
- is_sentinel?: boolean;
- package?: string;
- type?: string;
- };
- // This type is incomplete
- export type EventMetadata = {
- current_level?: number;
- current_tree_label?: TreeLabelPart[];
- directive?: string;
- display_title_with_tree_label?: boolean;
- filename?: string;
- finest_tree_label?: TreeLabelPart[];
- function?: string;
- message?: string;
- origin?: string;
- stripped_crash?: boolean;
- title?: string;
- type?: string;
- uri?: string;
- value?: string;
- };
- export enum EventOrGroupType {
- ERROR = 'error',
- CSP = 'csp',
- HPKP = 'hpkp',
- EXPECTCT = 'expectct',
- EXPECTSTAPLE = 'expectstaple',
- NEL = 'nel',
- DEFAULT = 'default',
- TRANSACTION = 'transaction',
- AGGREGATE_TRANSACTION = 'aggregateTransaction',
- GENERIC = 'generic',
- }
- /**
- * Event interface types.
- */
- export enum EntryType {
- EXCEPTION = 'exception',
- MESSAGE = 'message',
- REQUEST = 'request',
- STACKTRACE = 'stacktrace',
- TEMPLATE = 'template',
- CSP = 'csp',
- EXPECTCT = 'expectct',
- EXPECTSTAPLE = 'expectstaple',
- HPKP = 'hpkp',
- BREADCRUMBS = 'breadcrumbs',
- THREADS = 'threads',
- THREAD_STATE = 'thread-state',
- THREAD_TAGS = 'thread-tags',
- DEBUGMETA = 'debugmeta',
- SPANS = 'spans',
- RESOURCES = 'resources',
- }
- export type EntryDebugMeta = {
- data: {
- images: Array<Image | null>;
- };
- type: EntryType.DEBUGMETA;
- };
- export type EntryBreadcrumbs = {
- data: {
- values: Array<RawCrumb>;
- };
- type: EntryType.BREADCRUMBS;
- };
- export type EntryThreads = {
- data: {
- values?: Array<Thread>;
- };
- type: EntryType.THREADS;
- };
- export type EntryException = {
- data: ExceptionType;
- type: EntryType.EXCEPTION;
- };
- export type EntryStacktrace = {
- data: StacktraceType;
- type: EntryType.STACKTRACE;
- };
- export type EntrySpans = {
- data: RawSpanType[];
- type: EntryType.SPANS;
- };
- export type AggregateEntrySpans = {
- data: AggregateSpanType[];
- type: EntryType.SPANS;
- };
- type EntryMessage = {
- data: {
- formatted: string;
- params?: Record<string, any> | any[];
- };
- type: EntryType.MESSAGE;
- };
- export interface EntryRequestDataDefault {
- apiTarget: null;
- method: string;
- url: string;
- cookies?: [key: string, value: string][];
- data?: string | null | Record<string, any> | [key: string, value: any][];
- env?: Record<string, string>;
- fragment?: string | null;
- headers?: [key: string, value: string][];
- inferredContentType?:
- | null
- | 'application/json'
- | 'application/x-www-form-urlencoded'
- | 'multipart/form-data';
- query?: [key: string, value: string][] | string;
- }
- export interface EntryRequestDataGraphQl
- extends Omit<EntryRequestDataDefault, 'apiTarget' | 'data'> {
- apiTarget: 'graphql';
- data: {
- query: string;
- variables: Record<string, string | number | null>;
- operationName?: string;
- };
- }
- export type EntryRequest = {
- data: EntryRequestDataDefault | EntryRequestDataGraphQl;
- type: EntryType.REQUEST;
- };
- type EntryTemplate = {
- data: Frame;
- type: EntryType.TEMPLATE;
- };
- type EntryCsp = {
- data: Record<string, any>;
- type: EntryType.CSP;
- };
- type EntryGeneric = {
- data: Record<string, any>;
- type: EntryType.EXPECTCT | EntryType.EXPECTSTAPLE | EntryType.HPKP;
- };
- type EntryResources = {
- data: any; // Data is unused here
- type: EntryType.RESOURCES;
- };
- export type Entry =
- | EntryDebugMeta
- | EntryBreadcrumbs
- | EntryThreads
- | EntryException
- | EntryStacktrace
- | EntrySpans
- | EntryMessage
- | EntryRequest
- | EntryTemplate
- | EntryCsp
- | EntryGeneric
- | EntryResources;
- // Contexts: https://develop.sentry.dev/sdk/event-payloads/contexts/
- export interface BaseContext {
- type: string;
- }
- export enum DeviceContextKey {
- ARCH = 'arch',
- BATTERY_LEVEL = 'battery_level',
- BATTERY_STATUS = 'battery_status',
- BOOT_TIME = 'boot_time',
- BRAND = 'brand',
- CHARGING = 'charging',
- CPU_DESCRIPTION = 'cpu_description',
- DEVICE_TYPE = 'device_type',
- DEVICE_UNIQUE_IDENTIFIER = 'device_unique_identifier',
- EXTERNAL_FREE_STORAGE = 'external_free_storage',
- EXTERNAL_STORAGE_SIZE = 'external_storage_size',
- EXTERNAL_TOTAL_STORAGE = 'external_total_storage',
- FAMILY = 'family',
- FREE_MEMORY = 'free_memory',
- FREE_STORAGE = 'free_storage',
- LOW_MEMORY = 'low_memory',
- MANUFACTURER = 'manufacturer',
- MEMORY_SIZE = 'memory_size',
- MODEL = 'model',
- MODEL_ID = 'model_id',
- NAME = 'name',
- ONLINE = 'online',
- ORIENTATION = 'orientation',
- PROCESSOR_COUNT = 'processor_count',
- PROCESSOR_FREQUENCY = 'processor_frequency',
- SCREEN_DENSITY = 'screen_density',
- SCREEN_DPI = 'screen_dpi',
- SCREEN_HEIGHT_PIXELS = 'screen_height_pixels',
- SCREEN_RESOLUTION = 'screen_resolution',
- SCREEN_WIDTH_PIXELS = 'screen_width_pixels',
- SIMULATOR = 'simulator',
- STORAGE_SIZE = 'storage_size',
- SUPPORTS_ACCELEROMETER = 'supports_accelerometer',
- SUPPORTS_AUDIO = 'supports_audio',
- SUPPORTS_GYROSCOPE = 'supports_gyroscope',
- SUPPORTS_LOCATION_SERVICE = 'supports_location_service',
- SUPPORTS_VIBRATION = 'supports_vibration',
- USABLE_MEMORY = 'usable_memory',
- }
- // https://develop.sentry.dev/sdk/event-payloads/contexts/#device-context
- export interface DeviceContext
- extends Partial<Record<DeviceContextKey, unknown>>,
- BaseContext {
- type: 'device';
- [DeviceContextKey.NAME]: string;
- [DeviceContextKey.ARCH]?: string;
- [DeviceContextKey.BATTERY_LEVEL]?: number;
- [DeviceContextKey.BATTERY_STATUS]?: string;
- [DeviceContextKey.BOOT_TIME]?: string;
- [DeviceContextKey.BRAND]?: string;
- [DeviceContextKey.CHARGING]?: boolean;
- [DeviceContextKey.CPU_DESCRIPTION]?: string;
- [DeviceContextKey.DEVICE_TYPE]?: string;
- [DeviceContextKey.DEVICE_UNIQUE_IDENTIFIER]?: string;
- [DeviceContextKey.EXTERNAL_FREE_STORAGE]?: number;
- [DeviceContextKey.EXTERNAL_STORAGE_SIZE]?: number;
- [DeviceContextKey.EXTERNAL_TOTAL_STORAGE]?: number;
- [DeviceContextKey.FAMILY]?: string;
- [DeviceContextKey.FREE_MEMORY]?: number;
- [DeviceContextKey.FREE_STORAGE]?: number;
- [DeviceContextKey.LOW_MEMORY]?: boolean;
- [DeviceContextKey.MANUFACTURER]?: string;
- [DeviceContextKey.MEMORY_SIZE]?: number;
- [DeviceContextKey.MODEL]?: string;
- [DeviceContextKey.MODEL_ID]?: string;
- [DeviceContextKey.ONLINE]?: boolean;
- [DeviceContextKey.ORIENTATION]?: 'portrait' | 'landscape';
- [DeviceContextKey.PROCESSOR_COUNT]?: number;
- [DeviceContextKey.PROCESSOR_FREQUENCY]?: number;
- [DeviceContextKey.SCREEN_DENSITY]?: number;
- [DeviceContextKey.SCREEN_DPI]?: number;
- [DeviceContextKey.SCREEN_HEIGHT_PIXELS]?: number;
- [DeviceContextKey.SCREEN_RESOLUTION]?: string;
- [DeviceContextKey.SCREEN_WIDTH_PIXELS]?: number;
- [DeviceContextKey.SIMULATOR]?: boolean;
- [DeviceContextKey.STORAGE_SIZE]?: number;
- [DeviceContextKey.SUPPORTS_ACCELEROMETER]?: boolean;
- [DeviceContextKey.SUPPORTS_AUDIO]?: boolean;
- [DeviceContextKey.SUPPORTS_GYROSCOPE]?: boolean;
- [DeviceContextKey.SUPPORTS_LOCATION_SERVICE]?: boolean;
- [DeviceContextKey.SUPPORTS_VIBRATION]?: boolean;
- [DeviceContextKey.USABLE_MEMORY]?: number;
- // This field is deprecated in favour of locale field in culture context
- language?: string;
- // This field is deprecated in favour of timezone field in culture context
- timezone?: string;
- }
- enum RuntimeContextKey {
- BUILD = 'build',
- NAME = 'name',
- RAW_DESCRIPTION = 'raw_description',
- VERSION = 'version',
- }
- // https://develop.sentry.dev/sdk/event-payloads/contexts/#runtime-context
- interface RuntimeContext
- extends Partial<Record<RuntimeContextKey, unknown>>,
- BaseContext {
- type: 'runtime';
- [RuntimeContextKey.BUILD]?: string;
- [RuntimeContextKey.NAME]?: string;
- [RuntimeContextKey.RAW_DESCRIPTION]?: string;
- [RuntimeContextKey.VERSION]?: number;
- }
- type OSContext = {
- build: string;
- kernel_version: string;
- name: string;
- type: string;
- version: string;
- };
- export enum OtelContextKey {
- ATTRIBUTES = 'attributes',
- RESOURCE = 'resource',
- }
- // OpenTelemetry Context
- // https://develop.sentry.dev/sdk/performance/opentelemetry/#opentelemetry-context
- interface OtelContext extends Partial<Record<OtelContextKey, unknown>>, BaseContext {
- type: 'otel';
- [OtelContextKey.ATTRIBUTES]?: Record<string, unknown>;
- [OtelContextKey.RESOURCE]?: Record<string, unknown>;
- }
- export enum UnityContextKey {
- COPY_TEXTURE_SUPPORT = 'copy_texture_support',
- EDITOR_VERSION = 'editor_version',
- INSTALL_MODE = 'install_mode',
- RENDERING_THREADING_MODE = 'rendering_threading_mode',
- TARGET_FRAME_RATE = 'target_frame_rate',
- }
- // Unity Context
- // TODO(Priscila): Add this context to the docs
- export interface UnityContext {
- [UnityContextKey.COPY_TEXTURE_SUPPORT]: string;
- [UnityContextKey.EDITOR_VERSION]: string;
- [UnityContextKey.INSTALL_MODE]: string;
- [UnityContextKey.RENDERING_THREADING_MODE]: string;
- [UnityContextKey.TARGET_FRAME_RATE]: string;
- type: 'unity';
- }
- export enum MemoryInfoContextKey {
- ALLOCATED_BYTES = 'allocated_bytes',
- FRAGMENTED_BYTES = 'fragmented_bytes',
- HEAP_SIZE_BYTES = 'heap_size_bytes',
- HIGH_MEMORY_LOAD_THRESHOLD_BYTES = 'high_memory_load_threshold_bytes',
- TOTAL_AVAILABLE_MEMORY_BYTES = 'total_available_memory_bytes',
- MEMORY_LOAD_BYTES = 'memory_load_bytes',
- TOTAL_COMMITTED_BYTES = 'total_committed_bytes',
- PROMOTED_BYTES = 'promoted_bytes',
- PINNED_OBJECTS_COUNT = 'pinned_objects_count',
- PAUSE_TIME_PERCENTAGE = 'pause_time_percentage',
- INDEX = 'index',
- FINALIZATION_PENDING_COUNT = 'finalization_pending_count',
- COMPACTED = 'compacted',
- CONCURRENT = 'concurrent',
- PAUSE_DURATIONS = 'pause_durations',
- }
- // MemoryInfo Context
- // TODO(Priscila): Add this context to the docs
- export interface MemoryInfoContext {
- type: 'Memory Info' | 'memory_info';
- [MemoryInfoContextKey.FINALIZATION_PENDING_COUNT]: number;
- [MemoryInfoContextKey.COMPACTED]: boolean;
- [MemoryInfoContextKey.CONCURRENT]: boolean;
- [MemoryInfoContextKey.PAUSE_DURATIONS]: number[];
- [MemoryInfoContextKey.TOTAL_AVAILABLE_MEMORY_BYTES]?: number;
- [MemoryInfoContextKey.MEMORY_LOAD_BYTES]?: number;
- [MemoryInfoContextKey.TOTAL_COMMITTED_BYTES]?: number;
- [MemoryInfoContextKey.PROMOTED_BYTES]?: number;
- [MemoryInfoContextKey.PINNED_OBJECTS_COUNT]?: number;
- [MemoryInfoContextKey.PAUSE_TIME_PERCENTAGE]?: number;
- [MemoryInfoContextKey.INDEX]?: number;
- [MemoryInfoContextKey.ALLOCATED_BYTES]?: number;
- [MemoryInfoContextKey.FRAGMENTED_BYTES]?: number;
- [MemoryInfoContextKey.HEAP_SIZE_BYTES]?: number;
- [MemoryInfoContextKey.HIGH_MEMORY_LOAD_THRESHOLD_BYTES]?: number;
- }
- export enum ThreadPoolInfoContextKey {
- MIN_WORKER_THREADS = 'min_worker_threads',
- MIN_COMPLETION_PORT_THREADS = 'min_completion_port_threads',
- MAX_WORKER_THREADS = 'max_worker_threads',
- MAX_COMPLETION_PORT_THREADS = 'max_completion_port_threads',
- AVAILABLE_WORKER_THREADS = 'available_worker_threads',
- AVAILABLE_COMPLETION_PORT_THREADS = 'available_completion_port_threads',
- }
- // ThreadPoolInfo Context
- // TODO(Priscila): Add this context to the docs
- export interface ThreadPoolInfoContext {
- type: 'ThreadPool Info' | 'threadpool_info';
- [ThreadPoolInfoContextKey.MIN_WORKER_THREADS]: number;
- [ThreadPoolInfoContextKey.MIN_COMPLETION_PORT_THREADS]: number;
- [ThreadPoolInfoContextKey.MAX_WORKER_THREADS]: number;
- [ThreadPoolInfoContextKey.MAX_COMPLETION_PORT_THREADS]: number;
- [ThreadPoolInfoContextKey.AVAILABLE_WORKER_THREADS]: number;
- [ThreadPoolInfoContextKey.AVAILABLE_COMPLETION_PORT_THREADS]: number;
- }
- export enum ProfileContextKey {
- PROFILE_ID = 'profile_id',
- }
- export interface ProfileContext {
- [ProfileContextKey.PROFILE_ID]?: string;
- }
- export interface ReplayContext {
- replay_id: string;
- type: string;
- }
- export interface BrowserContext {
- name: string;
- version: string;
- }
- export interface ResponseContext {
- data: unknown;
- type: 'response';
- }
- export type EventContexts = {
- 'Memory Info'?: MemoryInfoContext;
- 'ThreadPool Info'?: ThreadPoolInfoContext;
- browser?: BrowserContext;
- client_os?: OSContext;
- device?: DeviceContext;
- feedback?: Record<string, any>;
- memory_info?: MemoryInfoContext;
- os?: OSContext;
- otel?: OtelContext;
- // TODO (udameli): add better types here
- // once perf issue data shape is more clear
- performance_issue?: any;
- profile?: ProfileContext;
- replay?: ReplayContext;
- response?: ResponseContext;
- runtime?: RuntimeContext;
- threadpool_info?: ThreadPoolInfoContext;
- trace?: TraceContextType;
- unity?: UnityContext;
- };
- export type Measurement = {value: number; type?: string; unit?: string};
- export type EventTag = {key: string; value: string};
- export type EventUser = {
- data?: string | null;
- email?: string;
- id?: string;
- ip_address?: string;
- name?: string | null;
- username?: string | null;
- };
- export type PerformanceDetectorData = {
- causeSpanIds: string[];
- offenderSpanIds: string[];
- parentSpanIds: string[];
- issueType?: IssueType;
- };
- type EventEvidenceDisplay = {
- /**
- * Used for alerting, probably not useful for the UI
- */
- important: boolean;
- name: string;
- value: string;
- };
- export type EventOccurrence = {
- detectionTime: string;
- eventId: string;
- /**
- * Arbitrary data that vertical teams can pass to assist with rendering the page.
- * This is intended mostly for use with customizing the UI, not in the generic UI.
- */
- evidenceData: Record<string, any>;
- /**
- * Data displayed in the evidence table. Used in all issue types besides errors.
- */
- evidenceDisplay: EventEvidenceDisplay[];
- fingerprint: string[];
- id: string;
- issueTitle: string;
- resourceId: string;
- subtitle: string;
- type: number;
- };
- type EventRelease = Pick<
- Release,
- | 'commitCount'
- | 'data'
- | 'dateCreated'
- | 'dateReleased'
- | 'deployCount'
- | 'id'
- | 'lastCommit'
- | 'lastDeploy'
- | 'ref'
- | 'status'
- | 'url'
- | 'userAgent'
- | 'version'
- | 'versionInfo'
- >;
- interface EventBase {
- contexts: EventContexts;
- crashFile: IssueAttachment | null;
- culprit: string;
- dateReceived: string;
- dist: string | null;
- entries: Entry[];
- errors: any[];
- eventID: string;
- fingerprints: string[];
- id: string;
- location: string | null;
- message: string;
- metadata: EventMetadata;
- occurrence: EventOccurrence | null;
- projectID: string;
- size: number;
- tags: EventTag[];
- title: string;
- type:
- | EventOrGroupType.CSP
- | EventOrGroupType.DEFAULT
- | EventOrGroupType.EXPECTCT
- | EventOrGroupType.EXPECTSTAPLE
- | EventOrGroupType.HPKP;
- user: EventUser | null;
- _meta?: Record<string, any>;
- context?: Record<string, any>;
- dateCreated?: string;
- device?: Record<string, any>;
- endTimestamp?: number;
- groupID?: string;
- groupingConfig?: {
- enhancements: string;
- id: string;
- };
- issueCategory?: IssueCategory;
- latestEventID?: string | null;
- measurements?: Record<string, Measurement>;
- nextEventID?: string | null;
- oldestEventID?: string | null;
- packages?: Record<string, string>;
- platform?: PlatformKey;
- previousEventID?: string | null;
- projectSlug?: string;
- release?: EventRelease | null;
- resolvedWith?: string[];
- sdk?: {
- name: string;
- version: string;
- } | null;
- sdkUpdates?: Array<SDKUpdatesSuggestion>;
- userReport?: any;
- }
- interface TraceEventContexts extends EventContexts {
- browser?: BrowserContext;
- profile?: ProfileContext;
- }
- export interface EventTransaction
- extends Omit<EventBase, 'entries' | 'type' | 'contexts'> {
- contexts: TraceEventContexts;
- endTimestamp: number;
- // EntryDebugMeta is required for profiles to render in the span
- // waterfall with the correct symbolication statuses
- entries: (
- | EntrySpans
- | EntryRequest
- | EntryDebugMeta
- | AggregateEntrySpans
- | EntryBreadcrumbs
- )[];
- startTimestamp: number;
- type: EventOrGroupType.TRANSACTION;
- _metrics_summary?: MetricsSummary;
- perfProblem?: PerformanceDetectorData;
- }
- export interface AggregateEventTransaction
- extends Omit<
- EventTransaction,
- | 'crashFile'
- | 'culprit'
- | 'dist'
- | 'dateReceived'
- | 'errors'
- | 'location'
- | 'metadata'
- | 'message'
- | 'occurrence'
- | 'type'
- | 'size'
- | 'user'
- | 'eventID'
- | 'fingerprints'
- | 'id'
- | 'projectID'
- | 'tags'
- | 'title'
- > {
- count: number;
- frequency: number;
- total: number;
- type: EventOrGroupType.AGGREGATE_TRANSACTION;
- }
- export interface EventError extends Omit<EventBase, 'entries' | 'type'> {
- entries: (
- | EntryException
- | EntryStacktrace
- | EntryRequest
- | EntryThreads
- | EntryDebugMeta
- )[];
- type: EventOrGroupType.ERROR;
- }
- export type Event = EventError | EventTransaction | EventBase;
- // Response from EventIdLookupEndpoint
- // /organizations/${orgSlug}/eventids/${eventId}/
- export type EventIdResponse = {
- event: Event;
- eventId: string;
- groupId: string;
- organizationSlug: string;
- projectSlug: string;
- };
|