Threads Interface

The threads interface allows you to specify the threads that were running at the time an event happened. These threads can also contain stack traces. As per policy, the thread that crashed with an exception should not have a stack trace, but instead, the thread_id attribute should be set on the exception and Sentry will connect the two.

This interface supports multiple thread values in the values key.



Required. The ID of the thread. Typically a number or numeric string. Needs to be unique among the threads. An exception can set the thread_id attribute to cross-reference this thread.


Optional. A flag indicating whether the thread crashed. Defaults to false.


Optional. A flag indicating whether the thread was in the foreground. Defaults to false.


Optional. The thread name.


Optional. A stack trace object corresponding to the Stack Trace Interface.

If this is an error event, the stack trace of the main exception should be declared in the Exception Interface instead. Sentry will automatically move the stack trace of the only crashed thread, if there is a single exception.


A single thread wrapped in values:

  "threads": {
    "values": [{
      "id": "0",
      "name": "main",
      "crashed": true,
      "stacktrace": {...}
On this page