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
90 changes: 90 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,96 @@ The following example illustrates the contexts part of the <Link to="/sdk/data-m
}
```

## Memory Info Context

The memory info context captures detailed information about memory usage and garbage collection metrics in an application at the time an event occurs. This is particularly useful for diagnosing memory-related issues in managed runtime environments.

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

`allocated_bytes`

: Currently allocated memory.

`compacted`

: Boolean indicating if memory was compacted.

`concurrent`

: Boolean indicating if concurrent garbage collection occurred.

`finalization_pending_count`

: Number of objects awaiting finalization.

`fragmented_bytes`

: Fragmented memory that cannot be used.

`heap_size_bytes`

: Total heap size.

`high_memory_load_threshold_bytes`

: Threshold for high memory load detection.

`index`

: GC generation index.

`memory_load_bytes`

: Current memory load.

`pause_durations`

: Array of GC pause durations in milliseconds.

`pause_time_percentage`

: Percentage of time spent in GC pauses.

`pinned_objects_count`

: Number of pinned objects in memory.

`promoted_bytes`

: Bytes promoted to higher generation.

`total_allocated_bytes`

: Total memory allocated since start.

`total_available_memory_bytes`

: Total memory available to the application.

`total_committed_bytes`

: Total committed virtual memory.

**Example Memory Info Context**

```json
{
"contexts": {
"memory_info": {
"type": "memory_info",
"allocated_bytes": 1048576, // 1 MiB
"total_allocated_bytes": 9437184, // 9 MiB
"heap_size_bytes": 3145728, // 3 MiB
"pinned_objects_count": 150,
"pause_time_percentage": 25.5,
"compacted": true,
"concurrent": true,
"pause_durations": [10, 5, 3]
}
}
}
```

## 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