From 14265f2608164b616402e4df4c6034dd95cc88de Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Thu, 15 Aug 2019 11:45:21 -0700 Subject: [PATCH] feat: use external as span type Rather than the shortened 'ext' use full 'external' in span types Fixes #1225 --- lib/instrumentation/http-shared.js | 2 +- lib/instrumentation/modules/http2.js | 2 +- test/instrumentation/modules/elasticsearch.js | 2 +- test/instrumentation/modules/http2.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/instrumentation/http-shared.js b/lib/instrumentation/http-shared.js index c708b077655..cb3a70bda4d 100644 --- a/lib/instrumentation/http-shared.js +++ b/lib/instrumentation/http-shared.js @@ -109,7 +109,7 @@ function ensureUrl (v) { } exports.traceOutgoingRequest = function (agent, moduleName, method) { - var spanType = 'ext.' + moduleName + '.http' + var spanType = 'external.' + moduleName + '.http' var ins = agent._instrumentation return function (orig) { diff --git a/lib/instrumentation/modules/http2.js b/lib/instrumentation/modules/http2.js index fa3398ec6ba..51d052d1d43 100644 --- a/lib/instrumentation/modules/http2.js +++ b/lib/instrumentation/modules/http2.js @@ -144,7 +144,7 @@ module.exports = function (http2, agent, { enabled }) { function wrapRequest (orig, host) { return function (headers) { - var span = agent.startSpan(null, 'ext.http2') + var span = agent.startSpan(null, 'external.http2') var id = span && span.transaction.id agent.logger.debug('intercepted call to http2.request %o', { id }) diff --git a/test/instrumentation/modules/elasticsearch.js b/test/instrumentation/modules/elasticsearch.js index 5b6f1deafa3..6497d745c60 100644 --- a/test/instrumentation/modules/elasticsearch.js +++ b/test/instrumentation/modules/elasticsearch.js @@ -179,7 +179,7 @@ function done (t, method, path, query) { let span1, span2 { - const type = 'ext.http.http' + const type = 'external.http.http' span1 = findObjInArray(data.spans, 'type', type) t.ok(span1, 'should have span with type ' + type) } { diff --git a/test/instrumentation/modules/http2.js b/test/instrumentation/modules/http2.js index 3a43f3b1ed2..b323b2c6e16 100644 --- a/test/instrumentation/modules/http2.js +++ b/test/instrumentation/modules/http2.js @@ -284,7 +284,7 @@ isSecure.forEach(secure => { var span = findObjInArray(data.spans, 'transaction_id', root.id) t.ok(span, 'root transaction should have span') - t.equal(span.type, 'ext.http2') + t.equal(span.type, 'external.http2') t.equal(span.name, `undefined http${secure ? 's' : ''}://localhost:${port}/sub`) server.close()