question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reduce log pollution with unnecessary stack traces

See original GitHub issue

Motivation

It’s hard to find relevant information in the log output if it’s polluted with stack traces of non-fatal errors or errors that are gracefully handled and mask the actual issue.

Proposal

Investigate options to reduce non-relevant information in the log, including

  • --verbose flag enabling stack traces (and disabling them by default)
  • reduce logging level of detail (log only exception msg instead of full exception including stack trace)
  • …?

Consideration that may help with the decision-making for these options:

  • fatality of potential error
  • which kind of information is useful to debug it (e.g. entity dump instead of stack trace)
  • can the underlying error be “handed through” / be enriched with more information
  • …?

Additional notes

There’s no general “this is the right way to do this”. But we should investigate, brainstorm and discuss how we want to handle it. Also, once we got to an agreement, we might want to document this in the contributor guides.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
keturncommented, Nov 27, 2021

I think for this discussion we’ll want to grab a few log files as case studies to center the conversation, and take notes on them as we go.

I am imagining this with a bunch of printouts and markers or crayons on a table, but I guess we will have to figure out some remote-friendly way to do it. 😆

1reaction
keturncommented, Nov 27, 2021

Investing more in the logger’s configuration may also involve a side discussion: Do we want to stick with slf4j? I think that part of the java ecosystem has shifted since we adopted it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing for Stack Traces - WSTG - v4.1 | OWASP Foundation
Stack traces are not vulnerabilities by themselves, but they often reveal information that is interesting to an attacker. Attackers attempt to generate ...
Read more >
How do I stop stacktraces truncating in logs - Stack Overflow
Show activity on this post. I found this useful to get the whole picture. Get a full stack trace of the Exception and...
Read more >
Stack Trace In Error Message | Pentest Vulnerability Wiki
Pentesting for a common vulnerability such as stack trace in the error message can be easy with the Vulnerability Wiki, organized by OWASP...
Read more >
Filtering irrelevant stack trace lines in logs - Tomasz Nurkiewicz
Tools and IDEs are doing a good job of reducing the noise. Eclipse has stack trace filter patterns for Junit, IntelliJ IDEA supports...
Read more >
Logging Stack Traces - cf-nodejs-logging-support - SAP
If a stack trace exceeds a total size of 55kB, it will not be logged entirely. The library removes as few lines as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found