UNPKG

1.5 kBTypeScriptView Raw
1import type { Event, Integration, IntegrationClass, StackFrame } from '@sentry/types';
2interface ContextLinesOptions {
3 /**
4 * Sets the number of context lines for each frame when loading a file.
5 * Defaults to 7.
6 *
7 * Set to 0 to disable loading and inclusion of source files.
8 **/
9 frameContextLines?: number;
10}
11export declare const contextLinesIntegration: (options?: ContextLinesOptions | undefined) => import("@sentry/types").IntegrationFnResult;
12/**
13 * Collects source context lines around the lines of stackframes pointing to JS embedded in
14 * the current page's HTML.
15 *
16 * This integration DOES NOT work for stack frames pointing to JS files that are loaded by the browser.
17 * For frames pointing to files, context lines are added during ingestion and symbolication
18 * by attempting to download the JS files to the Sentry backend.
19 *
20 * Use this integration if you have inline JS code in HTML pages that can't be accessed
21 * by our backend (e.g. due to a login-protected page).
22 *
23 * @deprecated Use `contextLinesIntegration()` instead.
24 */
25export declare const ContextLines: IntegrationClass<Integration & {
26 processEvent: (event: Event) => Event;
27}> & (new (options?: {
28 frameContextLines?: number;
29}) => Integration);
30/**
31 * Only exported for testing
32 */
33export declare function applySourceContextToFrame(frame: StackFrame, htmlLines: string[], htmlFilename: string, linesOfContext: number): StackFrame;
34export {};
35//# sourceMappingURL=contextlines.d.ts.map
\No newline at end of file