-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathindex.ts
73 lines (65 loc) · 1.84 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
export type {
Breadcrumb,
BreadcrumbHint,
PolymorphicRequest,
Request,
SdkInfo,
Event,
EventHint,
Exception,
Session,
// eslint-disable-next-line deprecation/deprecation
Severity,
SeverityLevel,
StackFrame,
Stacktrace,
Thread,
User,
} from '@sentry/types';
export type { AddRequestDataToEventOptions } from '@sentry/utils';
export type { NodeOptions } from './types';
export {
addGlobalEventProcessor,
addBreadcrumb,
captureException,
captureEvent,
captureMessage,
configureScope,
createTransport,
getHubFromCarrier,
getCurrentHub,
Hub,
makeMain,
Scope,
startTransaction,
SDK_VERSION,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
withScope,
} from '@sentry/core';
export { NodeClient } from './client';
export { makeNodeTransport } from './transports';
export { defaultIntegrations, init, defaultStackParser, lastEventId, flush, close, getSentryRelease } from './sdk';
export { addRequestDataToEvent, extractRequestData } from './requestdata';
export { deepReadDirSync } from './utils';
import { Integrations as CoreIntegrations } from '@sentry/core';
import { getMainCarrier } from '@sentry/hub';
import * as domain from 'domain';
import * as Handlers from './handlers';
import * as NodeIntegrations from './integrations';
const INTEGRATIONS = {
...CoreIntegrations,
...NodeIntegrations,
};
export { INTEGRATIONS as Integrations, Handlers };
// We need to patch domain on the global __SENTRY__ object to make it work for node in cross-platform packages like
// @sentry/hub. If we don't do this, browser bundlers will have troubles resolving `require('domain')`.
const carrier = getMainCarrier();
if (carrier.__SENTRY__) {
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
carrier.__SENTRY__.extensions.domain = carrier.__SENTRY__.extensions.domain || domain;
}