import type { Attribute, EventAttributes, InteractionId, MetricAttributes, MetricCategory, RequestOptions } from './types'; /** * Call this to enable auto record js uncaught exception */ export declare function enableAutoRecordJSUncaughtException(): void; /** * Records a js handled exception. * Optionally takes map with additional attributes showing context. * @param error * @param attributes */ export declare function recordHandledException(error: any, attributes?: EventAttributes): any; /** * Test with a native exception * @param message */ export declare function crashNow(message?: string): any; /** * Track a method as an interaction */ export declare function startInteraction(interactionName: string): Promise; /** * ANDROID ONLY * Name or rename an interaction */ export declare function setInteractionName(interactionName: string): any; /** * End an interaction * Required. The string ID for the interaction you want to end. * This string is returned when you use startInteraction(). */ export declare function endInteraction(id: InteractionId): any; /** * Metrics Categories: * VIEW_LOADING Creating sub views, controls, and other related tasks * VIEW_LAYOUT Inflation of layouts, resolving components * DATABASE SQLite and other file I/O * IMAGE Image loading and processing * JSON JSON parsing or creation * NETWORK Web service integration methods, remote resource loading * Create custom metrics */ export declare function recordMetric(category: MetricCategory | string, name: string, args?: MetricAttributes): any; /** * Create or update an attribute */ export declare function setAttribute(name: string | Attribute, value: boolean | number | string): any; /** * Create or update multiple attributes */ export declare function setAttributes(attributes: EventAttributes): any; /** * This method removes the attribute specified by the name string */ export declare function removeAttribute(name: string): any; /** * Set custom user ID for associating sessions with events and attributes */ export declare function setUserId(userId: string): any; /** * Track app activity/screen that may be helpful for troubleshooting crashes */ export declare function recordBreadcrumb(name: string, attributes?: EventAttributes): any; /** * Creates and records a custom event, for use in New Relic Insights * * IMPORTANT considerations and best practices include: * * - You should limit the total number of event types to approximately five. * eventType is meant to be used for high-level categories. * For example, you might create an event type Gestures. * * - Do not use eventType to name your custom events. * Create an attribute to name an event or use the optional name parameter. * You can create many custom events; it is only event types that you should limit. * * - Using the optional name parameter has the same effect as adding a name key in the attributes dictionary. * name is a keyword used for displaying your events in the New Relic UI. * To create a useful name, you might combine several attributes. */ export declare function recordCustomEvent(eventType: string, eventName?: string, attributes?: EventAttributes): any; /** * Record HTTP transactions at varying levels of detail */ export declare function noticeNetworkRequest(url: string, options: RequestOptions): any; /** * Record HTTP error transactions at varying levels of detail */ export declare function noticeNetworkFailure(url: string, options: RequestOptions): any; export type { Attribute, EventAttributes, InteractionId, MetricAttributes, MetricCategory, RequestOptions, };