> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JFR events

Atoti implements some custom Java Flight Recording events, that are captured when using the [Java Flight Recorder](https://docs.oracle.com/en/java/javase/25/docs/api/jdk.jfr/jdk/jfr/FlightRecorder.html).

> [!WARNING]
>
> Those events are public facing, and allow low-level debugging, but are susceptible to change at any version (major, minor, bugfix).

## How to use

It is possible to activate/deactivate an event when launching a JFR. It is recommended to use a configuration files, see `jfr --help configure`.

For example:

```xml theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
<configuration label="Custom" version="2.0">

    <event name="atoti.server.cube.CubeCommitEvent">
        <setting name="enabled">true</setting>
    </event>

    <event name="atoti.server.cube.HierarchyCommitEvent">
        <setting name="enabled">true</setting>
    </event>
</configuration>
```

Then when launching the java process, the argument `-XX:StartFlightRecording:filename=myFileName.jfr,settings=myCustomSettings.jfc` must be supplied.

To limit the number of events recorded, several JFR options can be used:

* `period`
* `threshold`
* `throttle` (starting with Java 25)

It is also possible to scrub an existing JFR from an event to reduce its size via the scrub command, see `jfr --help scrub`.

## Available events

| Event name | Event Label | Default | Meaning | Documentation |
| - | - | - | - | - |
| `atoti.server.memory.Allocation` | `Memory Allocation` | Disabled | Off-heap memory allocation | [Off-Heap Memory Monitoring](https://docs.activeviam.com/engine/java-sdk/6.1/monitoring/off-heap_memory.md) |
| `atoti.server.memory.Release` | `Memory Release` | Disabled | Off-heap memory freeing | [Off-Heap Memory Monitoring](https://docs.activeviam.com/engine/java-sdk/6.1/monitoring/off-heap_memory.md) |
| `atoti.server.cube.AggregatesContributionTaskEvent` | `AggregatesContributionTask` | Disabled (since 6.1.17) | Task that aggregates the updates from the database into the collectors | |
| `atoti.server.cube.ConflatedTransactionProcessingEvent` | `ConflatedTransactionProcessing` | Enabled | Conflation of several epochs by the continuous query engine | [Conflating Continuous Query Engine](https://docs.activeviam.com/engine/java-sdk/6.1/cube/continuous_query_engine.md#conflating-cqe) |
| `atoti.server.cube.provider.ContributionTaskEvent` | `ContributionTask` | Disabled (since 6.1.17) | Task that merges the contribution collectors into the aggregate provider | |
| `atoti.server.cube.provider.RemovalTaskEvent` | `RemovalTask` | Disabled (since 6.1.17) | Task that merges the removal collectors into the aggregate provider | |
| `atoti.server.cube.CubeCommitEvent` | `CubeCommit` | Enabled | Commit event on a cube | |
| `atoti.server.cube.HierarchyCommitEvent` | `HierarchyCommit` | Disabled (since 6.1.17) | Commit event on a hierarchy | |
| `atoti.server.cube.HierarchyPipelineTaskEvent` | `HierarchyPipelineTask` | Disabled (since 6.1.17) | Task that performs contributions from a source partition to one or more hierarchies | |
| `atoti.server.cube.MembersExtractionEvent` | `MembersExtraction` | Disabled (since 6.1.17) | Task that extracts and dictionarizes hierarchy members from fact records | |
| `atoti.server.mdx.MdxSelectQueryEvent` | `MdxSelectQuery` | Enabled | Execution of an MDX SELECT query | |
| `atoti.server.datastore.StorePartitionWorkEvent` | `StorePartitionWork` | Disabled (since 6.1.15) | Work type performed on a store partition | |
