It appears that a bug within the nodejs-logging-winston repository mirrors a previously resolved issue in the nodejs-logging-bunyan repository, specifically issue https://github.com/googleapis/nodejs-logging-bunyan/issues/626 - Duplicate HTTP request entries when running in Cloud Run.
The root of this problem seems to lie within this block of code in nodejs-logging-winston:
It appears that a bug within the
nodejs-logging-winston
repository mirrors a previously resolved issue in thenodejs-logging-bunyan
repository, specifically issue https://github.com/googleapis/nodejs-logging-bunyan/issues/626 - Duplicate HTTP request entries when running in Cloud Run.The root of this problem seems to lie within this block of code in
nodejs-logging-winston
:https://github.com/googleapis/nodejs-logging-winston/blob/9b8657aa436787591c03717e1111117cda6687ee/src/middleware/express.ts#L83
This block is identical to the code previously found in
nodejs-logging-bunyan
before the bug was fixed with pull request https://github.com/googleapis/nodejs-logging-bunyan/pull/658 (link):Following the implementation of the pull request in
nodejs-logging-bunyan
, the code was amended to (link):It seems plausible that applying a similar fix in
nodejs-logging-winston
could resolve this issue.