UNPKG

1.23 kBTypeScriptView Raw
1import { Event, EventProcessor, Integration, StackFrame } from '@sentry/types';
2/**
3 * Resets the file cache. Exists for testing purposes.
4 * @hidden
5 */
6export declare function resetFileContentCache(): void;
7interface ContextLinesOptions {
8 /**
9 * Sets the number of context lines for each frame when loading a file.
10 * Defaults to 7.
11 *
12 * Set to 0 to disable loading and inclusion of source files.
13 **/
14 frameContextLines?: number;
15}
16/** Add node modules / packages to the event */
17export declare class ContextLines implements Integration {
18 private readonly _options;
19 /**
20 * @inheritDoc
21 */
22 static id: string;
23 /**
24 * @inheritDoc
25 */
26 name: string;
27 constructor(_options?: ContextLinesOptions);
28 /** Get's the number of context lines to add */
29 private get _contextLines();
30 /**
31 * @inheritDoc
32 */
33 setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void): void;
34 /** Processes an event and adds context lines */
35 addSourceContext(event: Event): Promise<Event>;
36 /** Adds context lines to frames */
37 addSourceContextToFrames(frames: StackFrame[]): Promise<void>;
38}
39export {};
40//# sourceMappingURL=contextlines.d.ts.map
\No newline at end of file