Commit 28b6d75
authored
feat(serverlesss): allow disabling transaction traces (#9154)
## Background
- My team runs Express inside Lambda - we have a monolithic Lambda
function with express handling routing, middleware, etc
- We are using `@sentry/node` today, and tried adding
`@sentry/serverless` for it's timeout warning, auto-handling of `flush`,
and links to cloudwatch logs
- But this caused all of our performance transaction traces to have an
incorrect name (and various other tag + context issues)
## Proposal
- A new `startTrace` boolean flag that turns on/off the
transaction tracing feature of `@sentry/serverless`
- This will allow our team to use `@sentry/serverless`, but still rely
on express `tracingHandler` for performance traces
- This also follows the general approach of the serverless package,
where each feature is gated by a wrapOptions flag1 parent e507110 commit 28b6d75
File tree
3 files changed
+76
-37
lines changed- packages/serverless
- src
- test
- __mocks__/@sentry
3 files changed
+76
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
207 | 220 | | |
208 | 221 | | |
209 | 222 | | |
| |||
222 | 235 | | |
223 | 236 | | |
224 | 237 | | |
| 238 | + | |
225 | 239 | | |
226 | 240 | | |
227 | 241 | | |
| |||
279 | 293 | | |
280 | 294 | | |
281 | 295 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
305 | 322 | | |
306 | 323 | | |
307 | 324 | | |
308 | 325 | | |
309 | 326 | | |
310 | | - | |
311 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
312 | 332 | | |
313 | 333 | | |
314 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
186 | 204 | | |
187 | | - | |
| 205 | + | |
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
| |||
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
212 | | - | |
| 230 | + | |
213 | 231 | | |
214 | 232 | | |
215 | 233 | | |
| |||
284 | 302 | | |
285 | 303 | | |
286 | 304 | | |
287 | | - | |
| 305 | + | |
288 | 306 | | |
289 | 307 | | |
290 | 308 | | |
| |||
319 | 337 | | |
320 | 338 | | |
321 | 339 | | |
322 | | - | |
| 340 | + | |
323 | 341 | | |
324 | 342 | | |
325 | 343 | | |
| |||
355 | 373 | | |
356 | 374 | | |
357 | 375 | | |
358 | | - | |
| 376 | + | |
359 | 377 | | |
360 | 378 | | |
361 | 379 | | |
| |||
401 | 419 | | |
402 | 420 | | |
403 | 421 | | |
404 | | - | |
| 422 | + | |
405 | 423 | | |
406 | 424 | | |
407 | 425 | | |
| |||
437 | 455 | | |
438 | 456 | | |
439 | 457 | | |
440 | | - | |
| 458 | + | |
441 | 459 | | |
442 | 460 | | |
443 | 461 | | |
| |||
0 commit comments