/* * Copyright 2021. AppDynamics LLC and its affiliates. * All Rights Reserved. * * Represents the summary of a crash report. * * You can get one by registering a CrashReportCallback with: * * * ```js * Instrumentation.start({ * crashReportCallback: (summaries) => { * console.log(summaries); * }, * }); * ``` * */ export type CrashReportSummary = { /** Uniquely defines the crash, can be used as key to find full crash report. */ crashId: string; /** The exception name, may be `null` if no exception occured. */ exceptionName: string; /** The exception's reason, may be `null` if no exception occured. */ exceptionReason: string; /** The exception's signal name. */ signalName: string; /** The exception's signal code. */ signalCode: string; }; /** * Called when a crash report is about to be sent. * * Typically the summaries will have a size of 1, but if the app is crashing very early * during start up, summaries could be larger. * * Warning: This method will be scheduled on the *main thread*, so any long * operations should be performed asynchronously. * Warning: `crashReportingEnabled` agent config property must be `true` (default). * * @param summaries An array of CrashReportSummary objects. */ export interface CrashReportCallback { onCrashesReported: (summaries: CrashReportSummary[]) => void; }