Skip to content

Commit

Permalink
Update packages/dd-trace/src/appsec/reporter.js
Browse files Browse the repository at this point in the history
Co-authored-by: Carles Capell <[email protected]>
  • Loading branch information
uurien and CarlesDD authored Jun 11, 2024
1 parent 54297ad commit 6b1b221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dd-trace/src/appsec/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function finishRequest (req, res) {
Object.assign(newTags, filterHeaders(req.headers, REQUEST_HEADERS_MAP))

const appsecEvent = tags['appsec.event'] === 'true'
if (req.route && typeof req.route.path === 'string' && appsecEvent) {
if (typeof req.route?.path === 'string' && appsecEvent) {
newTags['http.endpoint'] = req.route.path
}
rootSpan.addTags(newTags)
Expand Down

0 comments on commit 6b1b221

Please sign in to comment.