diff --git a/packages/types/src/debugMeta.ts b/packages/types/src/debugMeta.ts index da3cf958857b..44ada6fd0e86 100644 --- a/packages/types/src/debugMeta.ts +++ b/packages/types/src/debugMeta.ts @@ -5,7 +5,7 @@ export interface DebugMeta { images?: Array; } -export type DebugImage = WasmDebugImage | SourceMapDebugImage; +export type DebugImage = WasmDebugImage | SourceMapDebugImage | MachoDebugImage; interface WasmDebugImage { type: 'wasm'; @@ -20,3 +20,11 @@ interface SourceMapDebugImage { code_file: string; // filename debug_id: string; // uuid } + +interface MachoDebugImage { + type: 'macho'; + debug_id: string; + image_addr: string; + image_size?: number; + code_file?: string; +} diff --git a/packages/types/src/profiling.ts b/packages/types/src/profiling.ts index 84a5238e7ace..3650500fcd7b 100644 --- a/packages/types/src/profiling.ts +++ b/packages/types/src/profiling.ts @@ -1,4 +1,6 @@ import type { DebugImage } from './debugMeta'; +import type { MeasurementUnit } from './measurement'; + export type ThreadId = string; export type FrameId = number; export type StackId = number; @@ -6,17 +8,22 @@ export type StackId = number; export interface ThreadCpuSample { stack_id: StackId; thread_id: ThreadId; + queue_address?: string; elapsed_since_start_ns: string; } export type ThreadCpuStack = FrameId[]; export type ThreadCpuFrame = { - function: string; + function?: string; file?: string; lineno?: number; colno?: number; abs_path?: string; + platform?: string; + instruction_addr?: string; + module?: string; + in_app?: boolean; }; export interface ThreadCpuProfile { @@ -68,4 +75,14 @@ export interface Profile { relative_start_ns: string; relative_end_ns: string; }[]; + measurements?: Record< + string, + { + unit: MeasurementUnit; + values: { + elapsed_since_start_ns: number; + value: number; + }[]; + } + >; }