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 {
146146 } ) ;
147147 }
148148
149- integrations = addOrUpdateIntegration ( new Integrations . Undici ( ) , integrations ) ;
150-
151149 options . integrations = integrations ;
152150}
153151
Original file line number Diff line number Diff line change @@ -164,15 +164,6 @@ describe('Server init()', () => {
164164 expect ( consoleIntegration ) . toBeDefined ( ) ;
165165 } ) ;
166166
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-
176167 describe ( '`Http` integration' , ( ) => {
177168 it ( 'adds `Http` integration with tracing enabled if `tracesSampleRate` is set' , ( ) => {
178169 init ( { tracesSampleRate : 1.0 } ) ;
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828 OnUncaughtException ,
2929 OnUnhandledRejection ,
3030 RequestData ,
31+ Undici ,
3132} from './integrations' ;
3233import { getModule } from './module' ;
3334import { makeNodeTransport } from './transports' ;
@@ -40,6 +41,7 @@ export const defaultIntegrations = [
4041 // Native Wrappers
4142 new Console ( ) ,
4243 new Http ( ) ,
44+ new Undici ( ) ,
4345 // Global Handlers
4446 new OnUncaughtException ( ) ,
4547 new OnUnhandledRejection ( ) ,
Original file line number Diff line number Diff line change 11import { configureScope } from '@sentry/core' ;
22import { RewriteFrames } from '@sentry/integrations' ;
33import type { NodeOptions } from '@sentry/node' ;
4- import { init as initNodeSdk , Integrations } from '@sentry/node' ;
4+ import { init as initNodeSdk } from '@sentry/node' ;
55import { addOrUpdateIntegration } from '@sentry/utils' ;
66
77import { applySdkMetadata } from '../common/metadata' ;
@@ -24,7 +24,6 @@ export function init(options: NodeOptions): void {
2424}
2525
2626function addServerIntegrations ( options : NodeOptions ) : void {
27- options . integrations = addOrUpdateIntegration ( new Integrations . Undici ( ) , options . integrations || [ ] ) ;
2827 options . integrations = addOrUpdateIntegration (
2928 new RewriteFrames ( { iteratee : rewriteFramesIteratee } ) ,
3029 options . integrations || [ ] ,
Original file line number Diff line number Diff line change @@ -47,20 +47,5 @@ describe('Sentry server SDK', () => {
4747 // @ts -ignore need access to protected _tags attribute
4848 expect ( currentScope . _tags ) . toEqual ( { runtime : 'node' } ) ;
4949 } ) ;
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- } ) ;
6550 } ) ;
6651} ) ;
You can’t perform that action at this time.
0 commit comments