[Feat][SDK- 431] Add threads information to payload#327
Merged
buongarzoni merged 37 commits intomasterfrom May 15, 2025
Merged
Conversation
…chains inside every thread
…ity to use it in RollbarThreadStrategy
|
|
||
| private final Throwable throwable; | ||
|
|
||
| private final Thread thread; |
Contributor
There was a problem hiding this comment.
Do you think we actually need the Thread object here, or would the information held by RollbarThread be sufficient?
Collaborator
Author
There was a problem hiding this comment.
I think you're right, I could just use the RollbarThread here, I'll check it out, thanks!
| + ", stackTraceElements=" + Arrays.toString(stackTraceElements) | ||
| + ", cause=" + cause | ||
| + ", throwable=" + throwable | ||
| + ", thread=" + thread |
Contributor
There was a problem hiding this comment.
What is the expected display value here?
Collaborator
Author
There was a problem hiding this comment.
something like thread=Thread[main,5,main]
anyway with the other suggestion you made, I'm probably going to change this
csaba-ilonka-rollbar
approved these changes
May 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
We will send information about the status of the threads in the application when sending an exception, whether it is caught or not.
{ "trace": { "exception": { "description": "another thing to exist", "message": "this is an error", "class": "java.lang.Error" }, "frames": [ { "filename": "MainActivity.java", "lineno": 77, "method": "run", "class_name": "com.rollbar.example.android.MainActivity$2" } ] }, "threads": [{ "id": "2", "name": "main", "state": "RUNNABLE", "is_main": true "priority": "5", "group": [{ "trace_chain": [{ "frames": [{ "filename": "Thread.java", "lineno": 1012, "method": "run", "class_name": "java.lang.Thread", }, { "filename": "Daemons.java", "lineno": 145, "method": "run", "class_name": "java.lang.Daemons$Daemon", }, ], "exception": { "message": "Uncaught exception", "class": "java.lang.RuntimeException" } }] }] }] }Fields in a Body object
How to test
With any of the test examples we can see this new information in the payload.
Fields in a Thread object
NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING or TERMINATED
In Java we only send 1 TraceChain per Group,
in other languages like Python (ExceptionGroup) or JS (AggregatorError),
it may be more TraceChains per group.
Type of change
Related issues
Checklists
Development
Code review