UNPKG

@sentry/react-native

Version:
27 lines (26 loc) 1.61 kB
import type { Client, Span } from '@sentry/core'; /** * Hooks on span end event to execute a callback when the span ends. */ export declare function onThisSpanEnd(client: Client, span: Span, callback: (span: Span) => void): void; export declare const adjustTransactionDuration: (client: Client, span: Span, maxDurationMs: number) => void; export declare const ignoreEmptyBackNavigation: (client: Client | undefined, span: Span | undefined) => void; /** * Discards empty "Route Change" transactions that never received route information. * This happens when navigation library emits a route change event but getCurrentRoute() returns undefined. * Such transactions don't contain any useful information and should not be sent to Sentry. * * This function must be called with a reference tracker function that can check if the span * was cleared from the integration's tracking (indicating it went through the state listener). */ export declare const ignoreEmptyRouteChangeTransactions: (client: Client | undefined, span: Span | undefined, defaultNavigationSpanName: string, isSpanStillTracked: () => boolean) => void; /** * Idle Transaction callback to only sample transactions with child spans. * To avoid side effects of other callbacks this should be hooked as the last callback. */ export declare const onlySampleIfChildSpans: (client: Client, span: Span) => void; /** * Hooks on AppState change to cancel the span if the app goes background. */ export declare const cancelInBackground: (client: Client, span: Span) => void; //# sourceMappingURL=onSpanEndUtils.d.ts.map