add_timestamp
Add a timestamp to each event as it flows through the workflow.
Overview
Add a timestamp to each event as it flows through the workflow. This step writes the current timestamp to a configurable field path in the event. The timestamp can be formatted as either a Unix epoch (integer seconds since 1970) or an ISO8601 string (RFC 3339 format). This is useful for tracking when events were processed, creating audit trails, or adding temporal metadata for downstream systems. Nested dictionaries are automatically created as needed, and any existing value at the target path is overwritten.
Quick Start
steps:
- type: add_timestampConfiguration
| Parameter | Type | Required | Description |
|---|---|---|---|
output_to | string | No | Dot-delimited path where the timestamp will be written; intermediate dicts are created if missing. Defaults to 'meta.timestamp'.
Default: "meta.timestamp" |
field | string | No | DEPRECATED: Use 'output_to' instead. Dot-delimited path where the timestamp will be written. |
format | string | No | Timestamp format. 'epoch' emits integer seconds since the Unix epoch (default). 'iso8601' emits an RFC3339 string truncated to whole seconds.
Default: "epoch"
Options: [object Object], [object Object] |
Examples
Default epoch timestamp
Add Unix timestamp (seconds since epoch) to the default meta.timestamp field
type: add_timestamp
ISO8601 formatted timestamp
Add human-readable ISO8601 timestamp for logging and display
type: add_timestamp
format: iso8601
Custom field for processing time
Track when an event was processed at a specific stage
type: add_timestamp
output_to: processing.completed_at
format: iso8601
Multiple timestamps in workflow
Add different timestamps at different stages (use multiple steps)
type: add_timestamp
output_to: audit.received_at
format: epoch
Advanced Options
These options are available on all steps for error handling and retry logic:
| Parameter | Type | Default | Description |
|---|---|---|---|
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |