@@ -87,6 +87,8 @@ describe('The Trace agent', function () {
8787 type : 'sr' ,
8888 time : time ,
8989 data : {
90+ host : host ,
91+ protocol : 'http' ,
9092 rpcId : parentCommId ,
9193 endpoint : url ,
9294 method : 'GET' ,
@@ -182,6 +184,8 @@ describe('The Trace agent', function () {
182184 type : 'sr' ,
183185 time : time ,
184186 data : {
187+ host : host ,
188+ protocol : 'http' ,
185189 rpcId : parentCommId ,
186190 endpoint : url ,
187191 method : 'GET' ,
@@ -198,6 +202,7 @@ describe('The Trace agent', function () {
198202 requestId : requestId ,
199203 parentCommId : parentCommId ,
200204 parentServiceId : parentServiceId ,
205+ protocol : 'http' ,
201206 url : url ,
202207 host : host ,
203208 method : 'GET'
@@ -207,7 +212,10 @@ describe('The Trace agent', function () {
207212 requestId : requestId ,
208213 parentCommId : parentCommId ,
209214 responseTime : responseTime ,
210- statusCode : statusCode ,
215+ protocol : 'http' ,
216+ protocolData : { statusCode : statusCode } ,
217+ statusDescription : String ( statusCode ) ,
218+ status : 0 ,
211219 mustCollect : '1'
212220 } )
213221
@@ -221,6 +229,8 @@ describe('The Trace agent', function () {
221229 type : 'sr' ,
222230 time : time ,
223231 data : {
232+ host : host ,
233+ protocol : 'http' ,
224234 rpcId : parentCommId ,
225235 endpoint : url ,
226236 method : 'GET' ,
@@ -231,7 +241,10 @@ describe('The Trace agent', function () {
231241 type : 'ss' ,
232242 time : time ,
233243 data : {
244+ protocol : 'http' ,
245+ status : 'ok' ,
234246 rpcId : parentCommId ,
247+ statusDescription : String ( statusCode ) ,
235248 statusCode : statusCode
236249 }
237250 } ]
@@ -245,6 +258,7 @@ describe('The Trace agent', function () {
245258 parentCommId : parentCommId ,
246259 parentServiceId : parentServiceId ,
247260 url : url ,
261+ protocol : 'http' ,
248262 host : host ,
249263 method : 'GET'
250264 } )
@@ -253,7 +267,8 @@ describe('The Trace agent', function () {
253267 childCommId : childCommId ,
254268 method : 'POST' ,
255269 host : 'remote-host' ,
256- url : '/products'
270+ url : '/products' ,
271+ protocol : 'http'
257272 } )
258273
259274 expect ( agent . totalRequestCount ) . to . eql ( 1 )
@@ -266,6 +281,8 @@ describe('The Trace agent', function () {
266281 type : 'sr' ,
267282 time : time ,
268283 data : {
284+ host : host ,
285+ protocol : 'http' ,
269286 rpcId : parentCommId ,
270287 endpoint : url ,
271288 method : 'GET' ,
@@ -276,6 +293,7 @@ describe('The Trace agent', function () {
276293 type : 'cs' ,
277294 time : time ,
278295 data : {
296+ protocol : 'http' ,
279297 rpcId : childCommId ,
280298 method : 'POST' ,
281299 host : 'remote-host' ,
@@ -288,6 +306,7 @@ describe('The Trace agent', function () {
288306 it ( 'does report' , function ( ) {
289307 agent . sampleRate = 1
290308 agent . serverReceive ( {
309+ protocol : 'http' ,
291310 requestId : requestId ,
292311 parentCommId : parentCommId ,
293312 parentServiceId : parentServiceId ,
@@ -308,6 +327,8 @@ describe('The Trace agent', function () {
308327 type : 'sr' ,
309328 time : time ,
310329 data : {
330+ host : host ,
331+ protocol : 'http' ,
311332 rpcId : parentCommId ,
312333 endpoint : url ,
313334 method : 'GET' ,
@@ -331,6 +352,7 @@ describe('The Trace agent', function () {
331352 it ( 'does report error' , function ( ) {
332353 agent . sampleRate = 1
333354 agent . serverReceive ( {
355+ protocol : 'http' ,
334356 requestId : requestId ,
335357 parentCommId : parentCommId ,
336358 parentServiceId : parentServiceId ,
@@ -346,12 +368,14 @@ describe('The Trace agent', function () {
346368 expect ( agent . reservoirSampler . getItems ( ) ) . to . eql ( [ ] )
347369 expect ( agent . partials [ requestId ] ) . to . eql ( {
348370 requestId : requestId ,
349- isForceSampled : false ,
371+ isForceSampled : true ,
350372 isSampled : false ,
351373 events : [ {
352374 type : 'sr' ,
353375 time : time ,
354376 data : {
377+ host : host ,
378+ protocol : 'http' ,
355379 rpcId : parentCommId ,
356380 endpoint : url ,
357381 method : 'GET' ,
@@ -402,6 +426,7 @@ describe('The Trace agent', function () {
402426 agent . reservoirSampler . addReturnsSuccess ( 1 )
403427 }
404428 agent . serverReceive ( {
429+ protocol : 'http' ,
405430 requestId : requestId ,
406431 parentCommId : parentCommId ,
407432 parentServiceId : parentServiceId ,
@@ -411,10 +436,13 @@ describe('The Trace agent', function () {
411436 } )
412437
413438 agent . serverSend ( {
439+ protocol : 'http' ,
414440 requestId : requestId ,
415441 parentCommId : parentCommId ,
416442 responseTime : responseTime ,
417- statusCode : statusCode ,
443+ status : 0 ,
444+ statusDescription : String ( statusCode ) ,
445+ protocolData : { statusCode : statusCode } ,
418446 mustCollect : '1'
419447 } )
420448
0 commit comments