import { NodeRuntimeMetricsOptions } from '@sentry/node'; /** * Which metrics to collect in the Bun runtime metrics integration. * Explicitly picks the metrics available in Bun from `NodeRuntimeMetricsOptions['collect']`. * Event loop delay percentiles are excluded because `monitorEventLoopDelay` is unavailable in Bun. */ type BunCollectOptions = Pick, 'cpuUtilization' | 'cpuTime' | 'memHeapUsed' | 'memHeapTotal' | 'memRss' | 'memExternal' | 'eventLoopUtilization' | 'uptime'>; export interface BunRuntimeMetricsOptions { /** * Which metrics to collect. * * Default on (6 metrics): * - `cpuUtilization` — CPU utilization ratio * - `memRss` — Resident Set Size (actual memory footprint) * - `memHeapUsed` — V8 heap currently in use * - `memHeapTotal` — total V8 heap allocated * - `eventLoopUtilization` — fraction of time the event loop was active * - `uptime` — process uptime (detect restarts/crashes) * * Default off (opt-in): * - `cpuTime` — raw user/system CPU time in seconds * - `memExternal` — external/ArrayBuffer memory (relevant for native addons) * * Note: event loop delay percentiles (p50, p99, etc.) are not available in Bun * because `monitorEventLoopDelay` from `perf_hooks` is not implemented. */ collect?: BunCollectOptions; /** * How often to collect metrics, in milliseconds. * Minimum allowed value is 1000ms. * @default 30000 * @minimum 1000 */ collectionIntervalMs?: number; } /** * Automatically collects Bun runtime metrics and emits them to Sentry. * * @example * ```ts * Sentry.init({ * integrations: [ * Sentry.bunRuntimeMetricsIntegration(), * ], * }); * ``` */ export declare const bunRuntimeMetricsIntegration: (options?: BunRuntimeMetricsOptions | undefined) => import("@sentry/core").Integration; export {}; //# sourceMappingURL=bunRuntimeMetrics.d.ts.map