-
Notifications
You must be signed in to change notification settings - Fork 11
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 session properties to native crashes from the associated session #1744
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1744 +/- ##
==========================================
- Coverage 85.31% 85.28% -0.04%
==========================================
Files 464 464
Lines 10775 10793 +18
Branches 1591 1596 +5
==========================================
+ Hits 9193 9205 +12
- Misses 870 871 +1
- Partials 712 717 +5
|
caf4088
to
fa88417
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fun Span.getSessionProperties(): Map<String, String> = | ||
attributes?.filter { it.key != null && it.data != null }?.associate { it.key to it.data } as Map<String, String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see anywhere this function was used in review & am not sure of its purpose. It seems like either the name or functionality is wrong as the session properties don't live exclusively on a span's attributes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might've been looking at an older version? I added usage after the first commit - in line 75 of PayloadResurrectionServiceImpl.kt
crashAttributes.setAttribute( | ||
key = embCrashNumber, | ||
value = nativeCrashNumber.toString(), | ||
keepBlankishValues = false, | ||
) | ||
|
||
// nativeCrash.appState?.let { appState -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did so in an subsequent commit
inputStream = GZIPInputStream(cacheStorageService.loadPayloadAsStream(this)), | ||
type = envelopeType.serializedType | ||
) | ||
private fun processUndeliveredPayload( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is fairly long with lots of indentation & that makes it hard to read IMO. I'd suggest breaking it into 2-3 smaller functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Good call.
179c62c
to
8f57ff9
Compare
Merge activity
|
Goal
Use appState and session properties from associated session when sending native crashes. Prior to this, metadata from the current session was being used erroneously. Now, we will grab this from the session that is associated with the crash that will be resurrected.
In a later PR, the code will be modified to take from the cached payload envelope if a session doesn't exist.