Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Jan 20, 2026

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.17%. Comparing base (9631f54) to head (13879e1).
⚠️ Report is 328 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7993      +/-   ##
============================================
+ Coverage     89.99%   90.17%   +0.18%     
- Complexity     7079     7482     +403     
============================================
  Files           803      834      +31     
  Lines         21419    22564    +1145     
  Branches       2086     2240     +154     
============================================
+ Hits          19276    20348    +1072     
- Misses         1479     1514      +35     
- Partials        664      702      +38     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

((ExtendedLogRecordBuilder) logger.logRecordBuilder())
.setException(new Exception("error"))
.setAttribute(EXCEPTION_MESSAGE, "custom message")
.emit();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user exception.message should take priority regardless of the invocation order yeah?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -46,7 +45,7 @@ public ExtendedSdkLogRecordBuilder setException(Throwable throwable) {
loggerSharedState
.getExceptionAttributeResolver()
.setExceptionAttributes(
this::setAttribute,
new ExceptionAttributeSetterWithPrecedence(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add a private method setExceptionAttribute (or similar) with the same signature as setAttribute. This would avoid allocating the extra ExceptionAttributeSetterWithPrecedence object. Not that its hugely important because we're in the setException code path which is allocation-heavy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trask trask marked this pull request as ready for review February 3, 2026 03:52
@trask trask requested a review from a team as a code owner February 3, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants