Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit 9b39b7a

Browse files
committed
statuscode is from res and not from req
1 parent 7ea593e commit 9b39b7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ module.exports = function (options) {
3838
}
3939

4040
if (response_code) {
41-
statTags.push("response_code:" + req.statusCode);
42-
datadog.increment(stat + '.response_code.' + req.statusCode , 1, statTags);
41+
statTags.push("response_code:" + res.statusCode);
42+
datadog.increment(stat + '.response_code.' + res.statusCode , 1, statTags);
4343
}
4444

4545
datadog.histogram(stat + '.response_time', (new Date() - req._startTime), 1, statTags);

0 commit comments

Comments
 (0)