We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 452b531 commit 1194a1eCopy full SHA for 1194a1e
packages/datadog-plugin-xmlhttprequest/src/index.js
@@ -48,7 +48,14 @@ function createWrapSend (tracer, config) {
48
this.addEventListener('load', () => span.setTag('http.status', this.status))
49
this.addEventListener('loadend', () => span.finish())
50
51
- return tracer.scope().bind(send, span).apply(this, arguments)
+ try {
52
+ return tracer.scope().bind(send, span).apply(this, arguments)
53
+ } catch (e) {
54
+ span.setTag('error', e)
55
+ span.finish()
56
+
57
+ throw e
58
+ }
59
}
60
61
0 commit comments