Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions develop-docs/sdk/data-model/event-payloads/contexts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,54 @@ The following example illustrates the contexts part of the <Link to="/sdk/data-m
}
```

## Thread Pool Info Context

The thread pool info context captures detailed metrics about the thread pool state at the moment an event occurs. This context is useful for investigating performance bottlenecks, thread starvation, and resource contention issues in multi-threaded applications.

The `type` and default key is `"threadpool_info"`.

`available_worker_threads`

: Number of worker threads currently available in the thread pool. Worker threads are used for executing application code and handling CPU-bound tasks.

`available_completion_port_threads`

: Number of completion port threads (also known as I/O completion port threads) currently available. These threads handle I/O operations and asynchronous callbacks.

`max_worker_threads`

: Maximum number of worker threads the thread pool can have. This represents the upper limit for worker thread allocation.

`max_completion_port_threads`

: Maximum number of completion port threads the thread pool can maintain. This sets the ceiling for I/O completion port thread allocation.

`min_worker_threads`

: Minimum number of worker threads maintained by the thread pool. The thread pool will always keep at least this many worker threads active.

`min_completion_port_threads`

: Minimum number of completion port threads maintained by the thread pool. This ensures a baseline number of threads are available for I/O operations.

**Example Thread Pool Info Context**

```json
{
"contexts": {
"threadpool_info": {
"available_worker_threads": 1022,
"available_completion_port_threads": 1000,
"max_worker_threads": 1023,
"max_completion_port_threads": 1000,
"min_worker_threads": 1,
"min_completion_port_threads": 1
}
}
}
```


## Trace Context

Additional information that allows Sentry to connect multiple transactions, spans, and/or errors into one trace. **Important:** If the trace context is missing, relay will drop the transaction.
Expand Down
Loading