Sample
Configuration Options
Required Options
inputs(required)
A list of upstream source or transform
IDs. Wildcards (*
) are supported.
See configuration for more info.
Type | Syntax | Default | Example |
---|---|---|---|
array | literal | ["my-source-or-transform-id","prefix-*"] |
rate(required)
The rate at which events will be forwarded, expressed as 1/N. For example,
rate = 10
means 1 out of every 10 events will be forwarded and the rest will be dropped.
Type | Syntax | Default | Example |
---|---|---|---|
uint | [10] |
type(required)
The component type. This is a required field for all components and tells Vector which component to use.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["sample"] |
Advanced Options
key_field(optional)
The name of the log field whose value will be hashed to determine if the event should be passed.
Consistently samples the same events. Actual rate of sampling may differ from the configured one if
values in the field are not uniformly distributed. If left unspecified, or if the event doesn't have
key_field
, events will be count rated.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["message"] |
exclude(optional)
The set of logical conditions to exclude events from sampling.
Type | Syntax | Default | Example |
---|---|---|---|
string | remap_boolean_expression | [".status_code != 200 && !includes([\"info\", \"debug\"], .severity)"] |
How it Works
State
This component is stateless, meaning its behavior is consistent across each input.