Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use external as span type #1291

Merged
merged 1 commit into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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