File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
plugins/node/opentelemetry-instrumentation-pg/test Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,10 @@ describe('pg-pool', () => {
114114 function create ( config : PgInstrumentationConfig = { } ) {
115115 instrumentation . setConfig ( config ) ;
116116 instrumentation . enable ( ) ;
117+
118+ // Disable and enable the instrumentation to visit unwrap calls
119+ instrumentation . disable ( ) ;
120+ instrumentation . enable ( ) ;
117121 }
118122
119123 let pool : pgPool < pg . Client > ;
@@ -540,7 +544,7 @@ describe('pg-pool', () => {
540544 ) ;
541545 assert . strictEqual (
542546 metrics [ 1 ] . dataPoints [ 0 ] . attributes [
543- ATTR_DB_CLIENT_CONNECTION_STATE
547+ ATTR_DB_CLIENT_CONNECTION_STATE
544548 ] ,
545549 'used'
546550 ) ;
@@ -551,7 +555,7 @@ describe('pg-pool', () => {
551555 ) ;
552556 assert . strictEqual (
553557 metrics [ 1 ] . dataPoints [ 1 ] . attributes [
554- ATTR_DB_CLIENT_CONNECTION_STATE
558+ ATTR_DB_CLIENT_CONNECTION_STATE
555559 ] ,
556560 'idle'
557561 ) ;
@@ -764,7 +768,7 @@ describe('pg-pool', () => {
764768 ) ;
765769 assert . strictEqual (
766770 metrics [ 1 ] . dataPoints [ 0 ] . attributes [
767- ATTR_DB_CLIENT_CONNECTION_STATE
771+ ATTR_DB_CLIENT_CONNECTION_STATE
768772 ] ,
769773 'used'
770774 ) ;
Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ describe('pg', () => {
108108 function create ( config : PgInstrumentationConfig = { } ) {
109109 instrumentation . setConfig ( config ) ;
110110 instrumentation . enable ( ) ;
111+
112+ // Disable and enable the instrumentation to visit unwrap calls
113+ instrumentation . disable ( ) ;
114+ instrumentation . enable ( ) ;
111115 }
112116
113117 let postgres : typeof pg ;
You can’t perform that action at this time.
0 commit comments