Skip to main content

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

ParameterTypeDefaultRequiredDescription
field_typestringYesSource field type: attribute, body, or resource.
fieldstringConditionalRequired when field_type is attribute or resource.
match_typestringexactNoMatching mode: exact or regex.
only_if_unsetbooleantrueNoOnly set severity if it is not already present.
mappingsarrayYesOrdered 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" }
]
}