/
index.ts
156 lines (141 loc) · 4.29 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
export type {
Breadcrumb,
BreadcrumbHint,
PolymorphicRequest,
Request,
SdkInfo,
Event,
EventHint,
Exception,
Session,
SeverityLevel,
Span,
StackFrame,
Stacktrace,
Thread,
Transaction,
User,
} from '@sentry/types';
export type { AddRequestDataToEventOptions, TransactionNamingScheme } from '@sentry/utils';
export type { NodeOptions } from './types';
export {
// eslint-disable-next-line deprecation/deprecation
addGlobalEventProcessor,
addEventProcessor,
addBreadcrumb,
addIntegration,
captureException,
captureEvent,
captureMessage,
close,
createTransport,
flush,
// eslint-disable-next-line deprecation/deprecation
getActiveTransaction,
// eslint-disable-next-line deprecation/deprecation
getCurrentHub,
getClient,
isInitialized,
getCurrentScope,
getGlobalScope,
getIsolationScope,
Hub,
// eslint-disable-next-line deprecation/deprecation
makeMain,
setCurrentClient,
Scope,
SDK_VERSION,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
getSpanStatusFromHttpCode,
setHttpStatus,
withScope,
withIsolationScope,
captureCheckIn,
withMonitor,
setMeasurement,
getActiveSpan,
getRootSpan,
startSpan,
startInactiveSpan,
startSpanManual,
withActiveSpan,
getSpanDescendants,
continueTrace,
parameterize,
functionToStringIntegration,
inboundFiltersIntegration,
linkedErrorsIntegration,
requestDataIntegration,
metricsDefault as metrics,
startSession,
captureSession,
endSession,
} from '@sentry/core';
export {
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
} from '@sentry/core';
export { autoDiscoverNodePerformanceMonitoringIntegrations } from './tracing';
export { NodeClient } from './client';
export { makeNodeTransport } from './transports';
export {
getDefaultIntegrations,
init,
defaultStackParser,
getSentryRelease,
} from './sdk';
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
export { createGetModuleFromFilename } from './module';
import * as Handlers from './handlers';
import * as NodeIntegrations from './integrations';
import * as TracingIntegrations from './tracing/integrations';
// TODO: Deprecate this once we migrated tracing integrations
export const Integrations = {
...NodeIntegrations,
...TracingIntegrations,
};
export {
captureConsoleIntegration,
debugIntegration,
dedupeIntegration,
extraErrorDataIntegration,
rewriteFramesIntegration,
sessionTimingIntegration,
} from '@sentry/core';
export { consoleIntegration } from './integrations/console';
export { onUncaughtExceptionIntegration } from './integrations/onuncaughtexception';
export { onUnhandledRejectionIntegration } from './integrations/onunhandledrejection';
export { modulesIntegration } from './integrations/modules';
export { contextLinesIntegration } from './integrations/contextlines';
export { nodeContextIntegration } from './integrations/context';
export { localVariablesIntegration } from './integrations/local-variables';
export { spotlightIntegration } from './integrations/spotlight';
export { anrIntegration } from './integrations/anr';
export { hapiIntegration } from './integrations/hapi';
// eslint-disable-next-line deprecation/deprecation
export { Undici, nativeNodeFetchintegration } from './integrations/undici';
// eslint-disable-next-line deprecation/deprecation
export { Http, httpIntegration } from './integrations/http';
// TODO(v8): Remove all of these exports. They were part of a hotfix #10339 where we produced wrong .d.ts files because we were packing packages inside the /build folder.
export type { LocalVariablesIntegrationOptions } from './integrations/local-variables/common';
export type { DebugSession } from './integrations/local-variables/local-variables-sync';
export type { AnrIntegrationOptions } from './integrations/anr/common';
// ---
export { Handlers };
export { hapiErrorPlugin } from './integrations/hapi';
import { instrumentCron } from './cron/cron';
import { instrumentNodeCron } from './cron/node-cron';
import { instrumentNodeSchedule } from './cron/node-schedule';
/** Methods to instrument cron libraries for Sentry check-ins */
export const cron = {
instrumentCron,
instrumentNodeCron,
instrumentNodeSchedule,
};