Skip to content

Commit

Permalink
feat: use external as span type (#1291)
Browse files Browse the repository at this point in the history
Rather than the shortened `ext` use full `external` in span types.

Fixes #1225 

BREAKING CHANGE: All `ext.*` span types have been renamed to
`external.*`.
  • Loading branch information
Qard authored and watson committed Sep 20, 2019
1 parent 25ab9a8 commit 7e7cade
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/instrumentation/http-shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/instrumentation/modules/http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion test/instrumentation/modules/elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
} {
Expand Down
2 changes: 1 addition & 1 deletion test/instrumentation/modules/http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7e7cade

Please sign in to comment.