Skip to content

Commit 794fe56

Browse files
committed
try again to make the tests pass
1 parent dc9f5d4 commit 794fe56

File tree

2 files changed

+7
-7
lines changed
  • packages

2 files changed

+7
-7
lines changed

packages/datadog-plugin-router/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class RouterPlugin extends WebPlugin {
6262
this.addSub(`apm:${this.constructor.id}:middleware:error`, ({ req, error }) => {
6363
web.addError(req, error)
6464

65-
if (!this.config.middlewareTracingEnabled) return
65+
if (!this.config.middleware) return
6666

6767
const span = this._getActive(req)
6868

@@ -100,7 +100,7 @@ class RouterPlugin extends WebPlugin {
100100
}
101101

102102
_getMiddlewareSpan (name, childOf) {
103-
if (this.config.middlewareTracingEnabled === false) {
103+
if (this.config.middleware === false) {
104104
return childOf
105105
}
106106

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const web = {
4545
const validateStatus = getStatusValidator(config)
4646
const hooks = getHooks(config)
4747
const filter = urlFilter.getFilter(config)
48-
const middlewareTracingEnabled = getMiddlewareSetting(config, tracerConfig)
48+
const middleware = getMiddlewareSetting(config, tracerConfig)
4949
const queryStringObfuscation = getQsObfuscator(config)
5050

5151
return {
@@ -54,7 +54,7 @@ const web = {
5454
validateStatus,
5555
hooks,
5656
filter,
57-
middlewareTracingEnabled,
57+
middleware,
5858
queryStringObfuscation
5959
}
6060
},
@@ -160,7 +160,7 @@ const web = {
160160
const childOf = this.active(req)
161161
const config = context.config
162162

163-
if (config.middlewareTracingEnabled === false) {
163+
if (config.middleware === false) {
164164
return this.bindAndWrapMiddlewareErrors(fn, req, tracer, childOf)
165165
}
166166

@@ -574,8 +574,8 @@ function getHooks (config) {
574574

575575
function getMiddlewareSetting (config, tracerConfig) {
576576
if (config) {
577-
if (typeof config.middlewareTracingEnabled === 'boolean') {
578-
return config.middlewareTracingEnabled
577+
if (typeof config.middleware === 'boolean') {
578+
return config.middleware
579579
} else if (config.hasOwnProperty('middlewareTracingEnabled')) {
580580
log.error('Expected `middlewareTracingEnabled` to be a boolean.')
581581
}

0 commit comments

Comments
 (0)