File tree Expand file tree Collapse file tree 5 files changed +3
-28
lines changed Expand file tree Collapse file tree 5 files changed +3
-28
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,6 @@ function addServerIntegrations(options: NodeOptions): void {
146
146
} ) ;
147
147
}
148
148
149
- integrations = addOrUpdateIntegration ( new Integrations . Undici ( ) , integrations ) ;
150
-
151
149
options . integrations = integrations ;
152
150
}
153
151
Original file line number Diff line number Diff line change @@ -164,15 +164,6 @@ describe('Server init()', () => {
164
164
expect ( consoleIntegration ) . toBeDefined ( ) ;
165
165
} ) ;
166
166
167
- it ( 'adds the Undici integration' , ( ) => {
168
- init ( { } ) ;
169
-
170
- const nodeInitOptions = nodeInit . mock . calls [ 0 ] [ 0 ] as ModifiedInitOptions ;
171
- const undiciIntegration = findIntegrationByName ( nodeInitOptions . integrations , 'Undici' ) ;
172
-
173
- expect ( undiciIntegration ) . toBeDefined ( ) ;
174
- } ) ;
175
-
176
167
describe ( '`Http` integration' , ( ) => {
177
168
it ( 'adds `Http` integration with tracing enabled if `tracesSampleRate` is set' , ( ) => {
178
169
init ( { tracesSampleRate : 1.0 } ) ;
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
28
28
OnUncaughtException ,
29
29
OnUnhandledRejection ,
30
30
RequestData ,
31
+ Undici ,
31
32
} from './integrations' ;
32
33
import { getModule } from './module' ;
33
34
import { makeNodeTransport } from './transports' ;
@@ -40,6 +41,7 @@ export const defaultIntegrations = [
40
41
// Native Wrappers
41
42
new Console ( ) ,
42
43
new Http ( ) ,
44
+ new Undici ( ) ,
43
45
// Global Handlers
44
46
new OnUncaughtException ( ) ,
45
47
new OnUnhandledRejection ( ) ,
Original file line number Diff line number Diff line change 1
1
import { configureScope } from '@sentry/core' ;
2
2
import { RewriteFrames } from '@sentry/integrations' ;
3
3
import type { NodeOptions } from '@sentry/node' ;
4
- import { init as initNodeSdk , Integrations } from '@sentry/node' ;
4
+ import { init as initNodeSdk } from '@sentry/node' ;
5
5
import { addOrUpdateIntegration } from '@sentry/utils' ;
6
6
7
7
import { applySdkMetadata } from '../common/metadata' ;
@@ -24,7 +24,6 @@ export function init(options: NodeOptions): void {
24
24
}
25
25
26
26
function addServerIntegrations ( options : NodeOptions ) : void {
27
- options . integrations = addOrUpdateIntegration ( new Integrations . Undici ( ) , options . integrations || [ ] ) ;
28
27
options . integrations = addOrUpdateIntegration (
29
28
new RewriteFrames ( { iteratee : rewriteFramesIteratee } ) ,
30
29
options . integrations || [ ] ,
Original file line number Diff line number Diff line change @@ -47,20 +47,5 @@ describe('Sentry server SDK', () => {
47
47
// @ts -ignore need access to protected _tags attribute
48
48
expect ( currentScope . _tags ) . toEqual ( { runtime : 'node' } ) ;
49
49
} ) ;
50
-
51
- it ( 'adds the Undici integration' , ( ) => {
52
- init ( { } ) ;
53
-
54
- expect ( nodeInit ) . toHaveBeenCalledTimes ( 1 ) ;
55
- expect ( nodeInit ) . toHaveBeenCalledWith (
56
- expect . objectContaining ( {
57
- integrations : expect . arrayContaining ( [
58
- expect . objectContaining ( {
59
- name : 'Undici' ,
60
- } ) ,
61
- ] ) ,
62
- } ) ,
63
- ) ;
64
- } ) ;
65
50
} ) ;
66
51
} ) ;
You can’t perform that action at this time.
0 commit comments