Skip to content

Commit 77252c4

Browse files
committed
fix(instrumentations/http/server): read communication id
1 parent 320737d commit 77252c4

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/instrumentations/core/http/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ function httpServer (listener, agent) {
6464

6565
var parentServiceKey = headers['x-parent'] && Number(headers['x-parent'])
6666
var timestamp = headers['x-client-send'] && Number(headers['x-client-send'])
67+
var communicationId = headers['x-span-id']
6768

6869
var duffelBag = {
6970
severity: severity,
7071
transactionId: requestId,
7172
parentServiceKey: parentServiceKey,
72-
timestamp: timestamp
73+
timestamp: timestamp,
74+
communicationId: communicationId
7375
}
7476

7577
var resource = util.formatDataUrl(requestUrl)

lib/instrumentations/core/http/server.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ describe('The http.Server.prototype wrapper module', function () {
174174
parentServiceKey: 1,
175175
severity: 3,
176176
timestamp: 5,
177-
transactionId: 'tr-id'
177+
transactionId: 'tr-id',
178+
communicationId: 'comm-id'
178179
})
179180
})
180181

0 commit comments

Comments
 (0)