Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible replication of bug from nodejs-logging-bunyan #795

Closed
yuku opened this issue May 27, 2023 · 0 comments · Fixed by #821
Closed

Possible replication of bug from nodejs-logging-bunyan #795

yuku opened this issue May 27, 2023 · 0 comments · Fixed by #821
Assignees
Labels
api: logging Issues related to the googleapis/nodejs-logging-winston API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@yuku
Copy link

yuku commented May 27, 2023

It appears that a bug within the nodejs-logging-winston repository mirrors a previously resolved issue in the nodejs-logging-bunyan repository, specifically issue googleapis/nodejs-logging-bunyan#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:

if (env !== GCPEnv.APP_ENGINE && env !== GCPEnv.CLOUD_FUNCTIONS) {

This block is identical to the code previously found in nodejs-logging-bunyan before the bug was fixed with pull request googleapis/nodejs-logging-bunyan#658 (link):

  if (env !== GCPEnv.APP_ENGINE && env !== GCPEnv.CLOUD_FUNCTIONS) {

Following the implementation of the pull request in nodejs-logging-bunyan, the code was amended to (link):

  if (
    env !== GCPEnv.APP_ENGINE &&
    env !== GCPEnv.CLOUD_FUNCTIONS &&
    (env !== GCPEnv.CLOUD_RUN || !options.skipParentEntryForCloudRun)
  ) {

It seems plausible that applying a similar fix in nodejs-logging-winston could resolve this issue.

@yuku yuku added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 27, 2023
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/nodejs-logging-winston API. label May 27, 2023
@losalex losalex removed their assignment Jul 3, 2023
@cindy-peng cindy-peng self-assigned this Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/nodejs-logging-winston API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants