-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
index.ts
269 lines (243 loc) · 11.4 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
import type {
RequestInstrumentationOptions as RequestInstrumentationOptionsT,
SpanStatusType as SpanStatusTypeT,
} from '@sentry-internal/tracing';
import {
addExtensionMethods as addExtensionMethodsT,
Apollo,
BROWSER_TRACING_INTEGRATION_ID as BROWSER_TRACING_INTEGRATION_ID_T,
BrowserTracing as BrowserTracingT,
defaultRequestInstrumentationOptions as defaultRequestInstrumentationOptionsT,
Express,
extractTraceparentData as extractTraceparentDataT,
getActiveTransaction as getActiveTransactionT,
GraphQL,
hasTracingEnabled as hasTracingEnabledT,
IdleTransaction as IdleTransactionT,
instrumentOutgoingRequests as instrumentOutgoingRequestsT,
Mongo,
Mysql,
Postgres,
Prisma,
Span as SpanT,
// eslint-disable-next-line deprecation/deprecation
SpanStatus as SpanStatusT,
spanStatusfromHttpCode as spanStatusfromHttpCodeT,
startIdleTransaction as startIdleTransactionT,
stripUrlQueryAndFragment as stripUrlQueryAndFragmentT,
TRACEPARENT_REGEXP as TRACEPARENT_REGEXP_T,
Transaction as TransactionT,
} from '@sentry-internal/tracing';
// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for
// backwards compatibility), but that interferes with treeshaking, so we also export it separately
// here.
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK
*
* import { BrowserTracing } from '@sentry/browser';
* new BrowserTracing()
*/
export const BrowserTracing = BrowserTracingT;
// BrowserTracing is already exported as part of `Integrations` below (and for the moment will remain so for
// backwards compatibility), but that interferes with treeshaking, so we also export it separately
// here.
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK
*
* import { BrowserTracing } from '@sentry/browser';
* new BrowserTracing()
*/
export type BrowserTracing = BrowserTracingT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export const addExtensionMethods = addExtensionMethodsT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `getActiveTransaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export const getActiveTransaction = getActiveTransactionT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `extractTraceparentData` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export const extractTraceparentData = extractTraceparentDataT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `spanStatusfromHttpCode` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export const spanStatusfromHttpCode = spanStatusfromHttpCodeT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `SpanStatusType` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export type SpanStatusType = SpanStatusTypeT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export const Transaction = TransactionT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `Transaction` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export type Transaction = TransactionT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export const Span = SpanT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `Span` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
*/
export type Span = SpanT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export const BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID_T;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `defaultRequestInstrumentationOptions` can be imported from `@sentry/browser`, or your framework SDK
*/
export const defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptionsT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `hasTracingEnabled` can be imported from `@sentry/utils`
*/
export const hasTracingEnabled = hasTracingEnabledT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `stripUrlQueryAndFragment` can be imported from `@sentry/utils`
*/
export const stripUrlQueryAndFragment = stripUrlQueryAndFragmentT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*
* `TRACEPARENT_REGEXP` can be imported from `@sentry/utils`
*/
export const TRACEPARENT_REGEXP = TRACEPARENT_REGEXP_T;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export const IdleTransaction = IdleTransactionT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export type IdleTransaction = IdleTransactionT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export const instrumentOutgoingRequests = instrumentOutgoingRequestsT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export const startIdleTransaction = startIdleTransactionT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
// eslint-disable-next-line deprecation/deprecation
export const SpanStatus = SpanStatusT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
// eslint-disable-next-line deprecation/deprecation
export type SpanStatus = SpanStatusT;
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
*/
export type RequestInstrumentationOptions = RequestInstrumentationOptionsT;
export const Integrations = {
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `BrowserTracing` can be imported from `@sentry/browser` or your framework SDK
*
* import { BrowserTracing } from '@sentry/browser';
* new BrowserTracing()
*/
// eslint-disable-next-line deprecation/deprecation
BrowserTracing: BrowserTracing,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `Apollo` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.Apollo({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
Apollo: Apollo,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `Express` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.Express({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
Express: Express,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `GraphQL` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.GraphQL({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
GraphQL: GraphQL,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `Mongo` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.Mongo({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
Mongo: Mongo,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `Mysql` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.Mysql({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
Mysql: Mysql,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `Postgres` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.Postgres({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
Postgres: Postgres,
/**
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
* `Prisma` can be imported from `@sentry/node`
*
* import { Integrations } from '@sentry/node';
* new Integrations.Prisma({ ... })
*/
// eslint-disable-next-line deprecation/deprecation
Prisma: Prisma,
};
// Treeshakable guard to remove all code related to tracing
declare const __SENTRY_TRACING__: boolean;
// Guard for tree
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
// We are patching the global object with our hub extension methods
addExtensionMethodsT();
}