Skip to content

Commit ff09f50

Browse files
wconti27zarirhamza
andauthored
remove span kind from inferred proxy spans (#5265)
remove some unnecessary span information --------- Co-authored-by: Zarir Hamza <[email protected]>
1 parent 6b97186 commit ff09f50

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/dd-trace/src/plugins/util/inferred_proxy.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const log = require('../../log')
22
const tags = require('../../../../../ext/tags')
33

44
const RESOURCE_NAME = tags.RESOURCE_NAME
5-
const SPAN_KIND = tags.SPAN_KIND
65
const SPAN_TYPE = tags.SPAN_TYPE
76
const HTTP_URL = tags.HTTP_URL
87
const HTTP_METHOD = tags.HTTP_METHOD
@@ -49,7 +48,6 @@ function createInferredProxySpan (headers, childOf, tracer, context) {
4948
tags: {
5049
service: proxyContext.domainName || tracer._config.service,
5150
component: proxySpanInfo.component,
52-
[SPAN_KIND]: 'internal',
5351
[SPAN_TYPE]: 'web',
5452
[HTTP_METHOD]: proxyContext.method,
5553
[HTTP_URL]: proxyContext.domainName + proxyContext.path,
@@ -71,7 +69,7 @@ function createInferredProxySpan (headers, childOf, tracer, context) {
7169

7270
function setInferredProxySpanTags (span, proxyContext) {
7371
span.setTag(RESOURCE_NAME, `${proxyContext.method} ${proxyContext.path}`)
74-
span.setTag('_dd.inferred_span', '1')
72+
span.setTag('_dd.inferred_span', 1)
7573
return span
7674
}
7775

packages/dd-trace/test/plugins/util/inferred_proxy.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ describe('Inferred Proxy Spans', function () {
8181
expect(spans[0].meta).to.have.property('http.url', 'example.com/test')
8282
expect(spans[0].meta).to.have.property('http.method', 'GET')
8383
expect(spans[0].meta).to.have.property('http.status_code', '200')
84-
expect(spans[0].meta).to.have.property('span.kind', 'internal')
8584
expect(spans[0].meta).to.have.property('component', 'aws-apigateway')
86-
expect(spans[0].meta).to.have.property('_dd.inferred_span', '1')
85+
expect(spans[0].metrics).to.have.property('_dd.inferred_span', 1)
8786
expect(spans[0].start.toString()).to.be.equal('1729780025472999936')
8887

8988
expect(spans[0].span_id.toString()).to.be.equal(spans[1].parent_id.toString())
@@ -129,7 +128,6 @@ describe('Inferred Proxy Spans', function () {
129128
expect(spans[0].meta).to.have.property('http.url', 'example.com/test')
130129
expect(spans[0].meta).to.have.property('http.method', 'GET')
131130
expect(spans[0].meta).to.have.property('http.status_code', '500')
132-
expect(spans[0].meta).to.have.property('span.kind', 'internal')
133131
expect(spans[0].meta).to.have.property('component', 'aws-apigateway')
134132
expect(spans[0].error).to.be.equal(1)
135133
expect(spans[0].start.toString()).to.be.equal('1729780025472999936')

0 commit comments

Comments
 (0)