Skip to content

Commit

Permalink
OutboundPlugin#tagPeerService()
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed Jul 3, 2023
1 parent db4ec88 commit 67debdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/datadog-plugin-http2/src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class Http2ClientPlugin extends ClientPlugin {
}

_onClose ({ span }) {
this.tagPeerService(span)
span.finish()
}
}
Expand Down
6 changes: 5 additions & 1 deletion packages/dd-trace/src/plugins/outbound.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@ class OutboundPlugin extends TracingPlugin {

finish () {
const span = this.activeSpan
this.tagPeerService(span)
super.finish(...arguments)
}

tagPeerService (span) {
if (this.tracer._computePeerService) {
const peerData = this.getPeerService(span.context()._tags)
if (peerData) {
span.addTags(peerData)
}
}
super.finish(...arguments)
}

connect (url) {
Expand Down

0 comments on commit 67debdb

Please sign in to comment.