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

Add "caused by" section(s) when forwarding logs #1857

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Add "caused by" section(s) when forwarding logs #1857

merged 2 commits into from
Apr 17, 2024

Conversation

jtduffy
Copy link
Contributor

@jtduffy jtduffy commented Apr 17, 2024

Resolves #1189

This change will add the caused by portion of a stack trace, if available, when decorating logs for forwarding. Note that the maximum stack trace size of 300 is still enforced so stack traces can still be truncated. Added unit tests to verify the new functionality.

This logic is same used when generating stack traces for TracedErrors/ErrorEvents.

Changed instrumentation:

  • log4j1
  • log4j2
  • logback
  • JUL

@jtduffy jtduffy requested a review from a team April 17, 2024 13:55
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.77%. Comparing base (0e3a23f) to head (ddfb068).
Report is 23 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1857      +/-   ##
============================================
- Coverage     70.88%   70.77%   -0.11%     
+ Complexity     9974     9852     -122     
============================================
  Files           829      821       -8     
  Lines         39985    39694     -291     
  Branches       6058     6049       -9     
============================================
- Hits          28344    28095     -249     
+ Misses         8915     8874      -41     
+ Partials       2726     2725       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtduffy jtduffy merged commit c07478f into main Apr 17, 2024
110 checks passed
@jtduffy jtduffy deleted the log-caused-by branch April 17, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Exception cause is not shown in the logs for nested exceptions
3 participants