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

Incorrect routing of log entries. #909

Closed
pr4v33n opened this issue Oct 11, 2020 · 2 comments · Fixed by googleapis/gax-nodejs#921
Closed

Incorrect routing of log entries. #909

pr4v33n opened this issue Oct 11, 2020 · 2 comments · Fixed by googleapis/gax-nodejs#921
Assignees
Labels
api: logging Issues related to the googleapis/nodejs-logging API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@pr4v33n
Copy link

pr4v33n commented Oct 11, 2020

Environment details

  • OS: Google, Container-Optimized OS, 81-12871.148.0 stable
  • Node.js version: 12.16.1
  • npm version: 6.13.4
  • @google-cloud/logging version: 8.0.6

Steps to reproduce

We have the following log instances.

const logging = new Logging({ projectId });
export const fooLog = logging.log('foo-log');
export const barLog = logging.log('bar-log');
export const hamLog = logging.log('ham-log');

export async function logMessage(log: Log, severity: string, data: any): Promise<any> {
  return log.write(
      log.entry(
          {
            severity,
            resource: {
              type: 'gce_instance'
            }
          },
          data
      )
  )
}

Later in application code, we have calls writing to those logs.

logMessage(fooLog, 'INFO', {message: 'Foo message'});
logMessage(barLog, 'INFO', {message: 'Bar message'});
logMessage(hamLog, 'INFO', {message: 'Ham message'});

In Stackdriver log viewer, we noticed "Ham message" appearing in bar-log.
This behavior started ever since we upgraded our lib from 7.3.0 to 8.0.6

Thanks!

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/nodejs-logging API. label Oct 11, 2020
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Oct 11, 2020
@bcoe bcoe added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Oct 22, 2020
@bcoe
Copy link
Contributor

bcoe commented Oct 22, 2020

@pr4v33n thank you for the bug report, we are starting to dig into this.

@alexander-fenster
Copy link
Contributor

Hi @pr4v33n,

I fixed the bug in google-gax and released v2.9.1. Please reinstall your dependencies, make sure that npm ls google-gax shows 2.9.1, and check if it helped.

Thank you for the perfect bugreport!

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 API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. triage me I really want to be triaged. 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.

4 participants