Skip to content

Commit 7cdc9d1

Browse files
committed
chore(instrumentations): add debug warning for multiple writeHead calls
1 parent a778048 commit 7cdc9d1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/instrumentations/core/http/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ function httpServer (listener, agent) {
160160
}
161161
agent.rpmMetrics.addResponseTime(ssTime - srTime)
162162
agent.rpmMetrics.addStatusCode(response.statusCode)
163+
} else {
164+
debug('#httpServer', '[Warning] writeHead called multiple times, wrongly reported status codes may occur')
163165
}
164166
return original.apply(response, arguments)
165167
}

0 commit comments

Comments
 (0)