Skip to content

fix(log): include exception message in CPU stats warning log#3108

Merged
marevol merged 1 commit intomasterfrom
fix/improve-cpu-stats-warn-log-message
Apr 1, 2026
Merged

fix(log): include exception message in CPU stats warning log#3108
marevol merged 1 commit intomasterfrom
fix/improve-cpu-stats-warn-log-message

Conversation

@marevol
Copy link
Copy Markdown
Contributor

@marevol marevol commented Apr 1, 2026

Summary

Include exception message in the LoadControlMonitorTarget warning log so that the root cause is visible in single-line log consumers like Slack notifications.

Changes Made

  • Modified LoadControlMonitorTarget.expired() to embed e.getMessage() in the warn/debug log format string
  • Log4j2's {} placeholder renders the exception message inline, while the trailing e argument preserves the full stack trace in log files

Before

[2026-04-01T13:17:49.399] WARN ...LoadControlMonitorTarget - Failed to get search engine CPU stats.

After

[2026-04-01T13:17:49.399] WARN ...LoadControlMonitorTarget - Failed to get search engine CPU stats: request timed out after 10000ms

Testing

  • Verified compilation with mvn compile
  • No logic changes; only log message formatting

Additional Notes

  • No breaking changes
  • The full stack trace is still available in log files for detailed debugging

Include e.getMessage() in the warn/debug log output so that the
root cause is visible in single-line log consumers such as Slack
notifications, without requiring access to the full stack trace.
@marevol marevol self-assigned this Apr 1, 2026
@marevol marevol added this to the 15.6.0 milestone Apr 1, 2026
@marevol marevol merged commit 873cd81 into master Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant