Threads Interface

The Threads Interface specifies threads that were running at the time an event happened. These threads can also contain stack traces.

An event may contain one or more threads in an attribute named threads.

The threads attribute should be an object with the attribute values containing one or more values that are objects in the format described below.

As per Sentry 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.


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.


The following example illustrates the threads part of the event payload and omits other attributes for simplicity.

  "threads": {
    "values": [
        "id": "0",
        "name": "main",
        "crashed": true,
        "stacktrace": {}
You can edit this page on GitHub.
On this page