Set Severity
Overview
The Set Severity processor maps log values to OpenTelemetry severity levels and writes severity_number and severity_text.
This helps normalize inconsistent source severity formats into a common severity model for downstream analytics.
Supported types: Logs
Configuration
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
| field_type | string | — | Yes | Source field type: attribute, body, or resource. |
| field | string | — | Conditional | Required when field_type is attribute or resource. |
| match_type | string | exact | No | Matching mode: exact or regex. |
| only_if_unset | boolean | true | No | Only set severity if it is not already present. |
| mappings | array | — | Yes | Ordered list of { value, severity } mappings. First match wins. |
Example Configuration
{
"field_type": "attribute",
"field": "level",
"match_type": "exact",
"only_if_unset": true,
"mappings": [
{ "value": "debug", "severity": "DEBUG" },
{ "value": "info", "severity": "INFO" },
{ "value": "warn", "severity": "WARN" },
{ "value": "error", "severity": "ERROR" }
]
}