1 | import { Integrations as CoreIntegrations } from '@sentry/core';
|
2 | import type { StackParser } from '@sentry/types';
|
3 | import { NodeClient } from './client';
|
4 | import { Console, Context, ContextLines, Http, LinkedErrors, LocalVariables, Modules, OnUncaughtException, OnUnhandledRejection, RequestData, Undici } from './integrations';
|
5 | import type { NodeOptions } from './types';
|
6 | export declare const defaultIntegrations: (Console | Http | OnUncaughtException | OnUnhandledRejection | LinkedErrors | Modules | ContextLines | Context | RequestData | LocalVariables | Undici | CoreIntegrations.InboundFilters | CoreIntegrations.FunctionToString)[];
|
7 | /**
|
8 | * The Sentry Node SDK Client.
|
9 | *
|
10 | * To use this SDK, call the {@link init} function as early as possible in the
|
11 | * main entry module. To set context information or send manual events, use the
|
12 | * provided methods.
|
13 | *
|
14 | * @example
|
15 | * ```
|
16 | *
|
17 | * const { init } = require('@sentry/node');
|
18 | *
|
19 | * init({
|
20 | * dsn: '__DSN__',
|
21 | * // ...
|
22 | * });
|
23 | * ```
|
24 | *
|
25 | * @example
|
26 | * ```
|
27 | *
|
28 | * const { configureScope } = require('@sentry/node');
|
29 | * configureScope((scope: Scope) => {
|
30 | * scope.setExtra({ battery: 0.7 });
|
31 | * scope.setTag({ user_mode: 'admin' });
|
32 | * scope.setUser({ id: '4711' });
|
33 | * });
|
34 | * ```
|
35 | *
|
36 | * @example
|
37 | * ```
|
38 | *
|
39 | * const { addBreadcrumb } = require('@sentry/node');
|
40 | * addBreadcrumb({
|
41 | * message: 'My Breadcrumb',
|
42 | * // ...
|
43 | * });
|
44 | * ```
|
45 | *
|
46 | * @example
|
47 | * ```
|
48 | *
|
49 | * const Sentry = require('@sentry/node');
|
50 | * Sentry.captureMessage('Hello, world!');
|
51 | * Sentry.captureException(new Error('Good bye'));
|
52 | * Sentry.captureEvent({
|
53 | * message: 'Manual',
|
54 | * stacktrace: [
|
55 | * // ...
|
56 | * ],
|
57 | * });
|
58 | * ```
|
59 | *
|
60 | * @see {@link NodeOptions} for documentation on configuration options.
|
61 | */
|
62 | export declare function init(options?: NodeOptions): void;
|
63 | /**
|
64 | * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client
|
65 | */
|
66 | export declare function isAutoSessionTrackingEnabled(client?: NodeClient): boolean;
|
67 | /**
|
68 | * Returns a release dynamically from environment variables.
|
69 | */
|
70 | export declare function getSentryRelease(fallback?: string): string | undefined;
|
71 | /** Node.js stack parser */
|
72 | export declare const defaultStackParser: StackParser;
|
73 | //# sourceMappingURL=sdk.d.ts.map |
\ | No newline at end of file |