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

Error: Attempt to write logs with no transports #427

Closed
DominicKramer opened this issue Mar 15, 2019 · 6 comments · Fixed by #607
Closed

Error: Attempt to write logs with no transports #427

DominicKramer opened this issue Mar 15, 2019 · 6 comments · Fixed by #607
Assignees
Labels
api: logging Issues related to the googleapis/nodejs-logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@DominicKramer
Copy link
Contributor

From @dorshay6 on October 11, 2018 13:31

When sending a large log (body of the requestor sql query) I get the following error and there is no way to limit log size from Winston.

[winston] Attempt to write logs with no transports {“message”:“Thu, 11 Oct 2018 13:04:32 GMT uncaughtException: 3 INVALID_ARGUMENT: Log entry with size 318.8K exceeds maximum size of 110.0K, stack: Error: 3 INVALID_ARGUMENT: Log entry with size 318.8K exceeds maximum size of 110.0K\n    at Object.exports.createStatusError (/usr/src/app/node_modules/grpc/src/common.js:87:15)\n    at Object.onReceiveStatus (/usr/src/app/node_modules/grpc/src/client_interceptors.js:1188:28)\n    at InterceptingListener._callNext (/usr/src/app/node_modules/grpc/src/client_interceptors.js:564:42)\n    at InterceptingListener.onReceiveStatus (/usr/src/app/node_modules/grpc/src/client_interceptors.js:614:8)\n    at callback (/usr/src/app/node_modules/grpc/src/client_interceptors.js:841:24)“,”level”:“error”}

Environment details

  • OS: Docker (node:8.9.4)
  • Node.js version: 8.9.4
  • npm version:
  • @google-cloud/logging-winston version: 0.10.2

Steps to reproduce

  1. Send a log with over 110k size

Copied from original issue: googleapis/nodejs-logging-winston#190

@DominicKramer DominicKramer 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 Mar 15, 2019
@DominicKramer
Copy link
Contributor Author

From @dinvlad on October 18, 2018 16:52

Same issue here! It would be nice to be able either truncate log messages, or better still, automatically split them into multiple entries. As it stands right now, we miss critical messages completely. We can limit that manually I think, but that's not as convenient.

@DominicKramer
Copy link
Contributor Author

Thank you for letting us know about this and for suggesting solutions. It is really valuable feedback. I'll keep this thread updated with updates on how we address this.

@DominicKramer
Copy link
Contributor Author

From @kyle-mccarthy on January 26, 2019 3:59

I am having this issue after winston emits an error event. The specific error is a "TCP Read failed" and may be related to googleapis/google-cloud-node#2438

@DominicKramer
Copy link
Contributor Author

The issue is that it is the size of the log entry itself and not just the message that cannot be over 110K. This makes it difficult to split the log entry into multiple multiple entries if it is the labels and not just the log message that makes the log entry too large.

Truncating messages and labels would be an easier approach. Another approach would be to truncate labels but split the message into multiple entries (with each entry having duplicate labels).

I'm going to investigate whether these approaches are feasible.

@DominicKramer
Copy link
Contributor Author

From @dinvlad on March 11, 2019 0:3

I’d say that splitting messages into multiple lines would be the first and easier way to solve the problem (I’d even guess this covers the majority of setups).

@DominicKramer
Copy link
Contributor Author

I've moved this issue to the nodejs-logging repo since this issue should be handled by the @google-cloud/logging module itself that @google-cloud/logging-winston and @google-cloud/logging-bunyan use.

@DominicKramer DominicKramer added the triage me I really want to be triaged. label Mar 15, 2019
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Mar 15, 2019
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Sep 11, 2019
@bcoe bcoe closed this as completed in #607 Oct 16, 2019
@google-cloud-label-sync google-cloud-label-sync bot added the api: logging Issues related to the googleapis/nodejs-logging API. label Jan 31, 2020
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: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. 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