@@ -61,6 +61,7 @@ describe('Plugin', () => {
61
61
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'db.user' , 'postgres' )
62
62
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'db.type' , 'postgres' )
63
63
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'component' , 'pg' )
64
+ expect ( traces [ 0 ] [ 0 ] . metrics ) . to . have . property ( 'network.destination.port' , 5432 )
64
65
65
66
if ( implementation !== 'pg.native' ) {
66
67
expect ( traces [ 0 ] [ 0 ] . metrics ) . to . have . property ( 'db.pid' )
@@ -105,6 +106,7 @@ describe('Plugin', () => {
105
106
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'db.user' , 'postgres' )
106
107
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'db.type' , 'postgres' )
107
108
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'component' , 'pg' )
109
+ expect ( traces [ 0 ] [ 0 ] . metrics ) . to . have . property ( 'network.destination.port' , 5432 )
108
110
109
111
if ( implementation !== 'pg.native' ) {
110
112
expect ( traces [ 0 ] [ 0 ] . metrics ) . to . have . property ( 'db.pid' )
@@ -127,6 +129,7 @@ describe('Plugin', () => {
127
129
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( ERROR_MESSAGE , error . message )
128
130
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( ERROR_STACK , error . stack )
129
131
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'component' , 'pg' )
132
+ expect ( traces [ 0 ] [ 0 ] . metrics ) . to . have . property ( 'network.destination.port' , 5432 )
130
133
131
134
done ( )
132
135
} )
@@ -148,6 +151,7 @@ describe('Plugin', () => {
148
151
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( ERROR_MESSAGE , error . message )
149
152
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( ERROR_STACK , error . stack )
150
153
expect ( traces [ 0 ] [ 0 ] . meta ) . to . have . property ( 'component' , 'pg' )
154
+ expect ( traces [ 0 ] [ 0 ] . metrics ) . to . have . property ( 'network.destination.port' , 5432 )
151
155
152
156
done ( )
153
157
} )
0 commit comments