The Log Sampling processor can be used to filter out logs with a configured “drop ratio”.
Metrics | Logs | Traces |
---|---|---|
✓ |
Parameter | Type | Default | Description |
---|---|---|---|
drop_ratio | enum |
"0.50" |
The probability an entry is dropped (used for sampling). A value of 1.0 will drop 100% of matching entries, while a value of 0.0 will drop 0%. |
condition | string | true |
An OTTL expression used to match which log records to sample from. All paths in the log context are available to reference. All converters are available to use. |
condition
parameter requires HTP Agent v1.61.0
or above.Value drop ratio’s range from “0.0” (0%) to “1.00” (100%) with 5% increments. Note that the drop ratio value is a string.
Filter out 75% of logs where Attribute “ID” == 1.
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
id: sampling
name: sampling
spec:
type: sampling
parameters:
- name: drop_ratio
value: '0.75'
- name: condition
value: '(attributes["ID"] == 1)'