@@ -107,6 +107,7 @@ tap.test('fromSegment()', (t) => {
107107 // Should have no datastore properties.
108108 t . notOk ( hasOwnAttribute ( 'db.statement' ) )
109109 t . notOk ( hasOwnAttribute ( 'db.instance' ) )
110+ t . notOk ( hasOwnAttribute ( 'db.system' ) )
110111 t . notOk ( hasOwnAttribute ( 'peer.hostname' ) )
111112 t . notOk ( hasOwnAttribute ( 'peer.address' ) )
112113
@@ -167,6 +168,7 @@ tap.test('fromSegment()', (t) => {
167168 const hasOwnAttribute = Object . hasOwnProperty . bind ( agentAttributes )
168169 t . notOk ( hasOwnAttribute ( 'db.statement' ) )
169170 t . notOk ( hasOwnAttribute ( 'db.instance' ) )
171+ t . notOk ( hasOwnAttribute ( 'db.system' ) )
170172 t . notOk ( hasOwnAttribute ( 'peer.hostname' ) )
171173 t . notOk ( hasOwnAttribute ( 'peer.address' ) )
172174
@@ -176,7 +178,7 @@ tap.test('fromSegment()', (t) => {
176178 } )
177179 } )
178180
179- t . test ( 'should create an datastore span with an datastore segment' , ( t ) => {
181+ t . test ( 'should create a datastore span with a datastore segment' , ( t ) => {
180182 agent . config . transaction_tracer . record_sql = 'raw'
181183
182184 const shim = new DatastoreShim ( agent , 'test-data-store' )
@@ -249,7 +251,6 @@ tap.test('fromSegment()', (t) => {
249251 // Should have not http properties.
250252 const hasOwnAttribute = Object . hasOwnProperty . bind ( agentAttributes )
251253 t . notOk ( hasOwnAttribute ( 'http.url' ) )
252- t . notOk ( hasOwnAttribute ( 'server.address' ) )
253254 t . notOk ( hasOwnAttribute ( 'http.method' ) )
254255 t . notOk ( hasOwnAttribute ( 'http.request.method' ) )
255256
@@ -258,6 +259,9 @@ tap.test('fromSegment()', (t) => {
258259 t . same ( agentAttributes [ 'db.collection' ] , { [ STRING_TYPE ] : 'my-collection' } )
259260 t . same ( agentAttributes [ 'peer.hostname' ] , { [ STRING_TYPE ] : 'my-db-host' } )
260261 t . same ( agentAttributes [ 'peer.address' ] , { [ STRING_TYPE ] : 'my-db-host:/path/to/db.sock' } )
262+ t . same ( agentAttributes [ 'db.system' ] , { [ STRING_TYPE ] : 'TestStore' } ) // same as intrinsics.component
263+ t . same ( agentAttributes [ 'server.address' ] , { [ STRING_TYPE ] : 'my-db-host' } )
264+ t . same ( agentAttributes [ 'server.port' ] , { [ STRING_TYPE ] : '/path/to/db.sock' } )
261265
262266 const statement = agentAttributes [ 'db.statement' ]
263267 t . ok ( statement )
0 commit comments