Transaction
Transaction (transaction)
Sessionize related events using start/end markers and optional summary fields.
Stateful Transform json
Minimal example
actions: - transaction: {}JSON
{ "actions": [ { "transaction": {} } ]}Contents
Behaviour
Behaviour
| Field | Type | Required | Description |
|---|---|---|---|
use-document-marker ✓ | boolean (bool) | Treat document boundaries as transaction markers. Default: false |
Detection
Detection
| Field | Type | Required | Description |
|---|---|---|---|
start | string | Field/pattern (e.g. “type:start”) that opens a transaction. | |
end | string | Field/pattern that closes a transaction. |
General
General
| Field | Type | Required | Description |
|---|---|---|---|
description | string | Describe this step. | |
condition | lua-expression (string) | Only run this action when the Lua condition evaluates to true. Examples: 2 * count() |
Input
Input
| Field | Type | Required | Description |
|---|---|---|---|
group-by | field (string) | Group sessions independently by this field. Examples: data_field |
Output
Output
| Field | Type | Required | Description |
|---|---|---|---|
marker | string | Marker placed on emitted transaction envelopes. | |
common-fields | string[] | Common fields copied from each record to the transaction envelope. | |
combined-output ✓ | boolean (bool) | Emit a single combined event for the session instead of individual events. Default: false | |
combined-payload ✓ | boolean (bool) | When true, attach the payload array under _payload.Default: false |
Summary
Summary
| Field | Type | Required | Description |
|---|---|---|---|
session-summary | Transaction Session Summary | Optional session summary output (counts, durations, numeric stats). |
Timeouts
Timeouts
| Field | Type | Required | Description |
|---|---|---|---|
timeout-field | string | Marker emitted when upstream stalled events close an open transaction. | |
idle-timeout | duration (string) | Idle timeout that auto-closes sessions without explicit end markers (e.g. “5m”). |
Schema
- Transaction Session Summary - Transaction Session Numeric Field Fields
- Transaction Session Summary Fields
- Transaction Session Summary - Transaction Session Numeric Field - Transaction Session Metric Operation Options
Transaction Session Summary - Transaction Session Numeric Field Fields
| Field | Type | Required | Description |
|---|---|---|---|
field | field (string) | ✅ | Field to analyse across the session. Examples: data_field |
ops | Transaction Session Metric Operation[] | Operations to compute for the numeric field. Allowed values: min, max, sum, mean, stddev | |
prefix | string | Optional prefix applied to emitted metric fields. |
Transaction Session Summary Fields
| Field | Type | Required | Description |
|---|---|---|---|
event-count-field | field (string) | Output field containing the number of events in the session. Examples: data_field | |
duration-field | field (string) | Output field containing the session duration in milliseconds. Examples: data_field | |
numeric-fields | Transaction Session Numeric Field[] | Numeric fields to summarise with the configured operations. |
Transaction Session Summary - Transaction Session Numeric Field - Transaction Session Metric Operation Options
| Value | Name | Description |
|---|---|---|
min | min | Min |
max | max | Max |
sum | sum | Sum |
mean | mean | Mean |
stddev | stddev | Stddev |