1 | import { Integrations as CoreIntegrations } from '@sentry/core';
|
2 | import { NodeClient } from './client';
|
3 | import { Console, Http, LinkedErrors, OnUncaughtException, OnUnhandledRejection } from './integrations';
|
4 | import { NodeOptions } from './types';
|
5 | export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | Console | Http | OnUncaughtException | OnUnhandledRejection | LinkedErrors)[];
|
6 | /**
|
7 | * The Sentry Node SDK Client.
|
8 | *
|
9 | * To use this SDK, call the {@link init} function as early as possible in the
|
10 | * main entry module. To set context information or send manual events, use the
|
11 | * provided methods.
|
12 | *
|
13 | * @example
|
14 | * ```
|
15 | *
|
16 | * const { init } = require('@sentry/node');
|
17 | *
|
18 | * init({
|
19 | * dsn: '__DSN__',
|
20 | * // ...
|
21 | * });
|
22 | * ```
|
23 | *
|
24 | * @example
|
25 | * ```
|
26 | *
|
27 | * const { configureScope } = require('@sentry/node');
|
28 | * configureScope((scope: Scope) => {
|
29 | * scope.setExtra({ battery: 0.7 });
|
30 | * scope.setTag({ user_mode: 'admin' });
|
31 | * scope.setUser({ id: '4711' });
|
32 | * });
|
33 | * ```
|
34 | *
|
35 | * @example
|
36 | * ```
|
37 | *
|
38 | * const { addBreadcrumb } = require('@sentry/node');
|
39 | * addBreadcrumb({
|
40 | * message: 'My Breadcrumb',
|
41 | * // ...
|
42 | * });
|
43 | * ```
|
44 | *
|
45 | * @example
|
46 | * ```
|
47 | *
|
48 | * const Sentry = require('@sentry/node');
|
49 | * Sentry.captureMessage('Hello, world!');
|
50 | * Sentry.captureException(new Error('Good bye'));
|
51 | * Sentry.captureEvent({
|
52 | * message: 'Manual',
|
53 | * stacktrace: [
|
54 | * // ...
|
55 | * ],
|
56 | * });
|
57 | * ```
|
58 | *
|
59 | * @see {@link NodeOptions} for documentation on configuration options.
|
60 | */
|
61 | export declare function init(options?: NodeOptions): void;
|
62 | /**
|
63 | * This is the getter for lastEventId.
|
64 | *
|
65 | * @returns The last event id of a captured event.
|
66 | */
|
67 | export declare function lastEventId(): string | undefined;
|
68 | /**
|
69 | * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
|
70 | *
|
71 | * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
|
72 | * the client to wait until all events are sent before resolving the promise.
|
73 | * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
74 | * doesn't (or if there's no client defined).
|
75 | */
|
76 | export declare function flush(timeout?: number): Promise<boolean>;
|
77 | /**
|
78 | * Call `close()` on the current client, if there is one. See {@link Client.close}.
|
79 | *
|
80 | * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
|
81 | * parameter will cause the client to wait until all events are sent before disabling itself.
|
82 | * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
83 | * doesn't (or if there's no client defined).
|
84 | */
|
85 | export declare function close(timeout?: number): Promise<boolean>;
|
86 | /**
|
87 | * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client
|
88 | */
|
89 | export declare function isAutoSessionTrackingEnabled(client?: NodeClient): boolean;
|
90 | /**
|
91 | * Returns a release dynamically from environment variables.
|
92 | */
|
93 | export declare function getSentryRelease(fallback?: string): string | undefined;
|
94 | //# sourceMappingURL=sdk.d.ts.map |
\ | No newline at end of file |