You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/stanza/docs/operators/severity_parser.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,16 @@ The `severity_parser` operator sets the severity on an entry by parsing a value
4
4
5
5
### Configuration Fields
6
6
7
-
| Field | Default | Description |
8
-
| --- | --- | --- |
9
-
|`id`|`severity_parser`| A unique identifier for the operator. |
10
-
|`output`| Next in pipeline | The `id` for the operator to send parsed entries to. |
11
-
|`parse_from`| required | The [field](../types/field.md) from which the value will be parsed. |
12
-
|`on_error`|`send`| The behavior of the operator if it encounters an error. See [on_error](../types/on_error.md). |
13
-
|`preset`|`default`| A predefined set of values that should be interpreted at specific severity levels. |
14
-
|`mapping`|| A formatted set of values that should be interpreted as severity levels. |
15
-
|`if`|| An [expression](../types/expression.md) that, when set, will be evaluated to determine whether this operator should be used for the given entry. This allows you to do easy conditional parsing without branching logic with routers. |
16
-
7
+
| Field | Default | Description |
8
+
| --- | --- | --- |
9
+
|`id`|`severity_parser`| A unique identifier for the operator. |
10
+
|`output`| Next in pipeline | The `id` for the operator to send parsed entries to. |
11
+
|`parse_from`| required | The [field](../types/field.md) from which the value will be parsed. |
12
+
|`on_error`|`send`| The behavior of the operator if it encounters an error. See [on_error](../types/on_error.md). |
13
+
|`preset`|`default`| A predefined set of values that should be interpreted at specific severity levels. |
14
+
|`mapping`|| A formatted set of values that should be interpreted as severity levels. |
15
+
|`overwrite_with`|`false`| If `true`, the severity text will be set to the [standard short name](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#displaying-severity) corresponding to the severity number. |
16
+
|`if`|| An [expression](../types/expression.md) that, when set, will be evaluated to determine whether this operator should be used for the given entry. This allows you to do easy conditional parsing without branching logic with routers. |
Copy file name to clipboardExpand all lines: pkg/stanza/docs/types/severity.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,14 @@ Severity is represented as a number from 1 to 24. The meaning of these severity
8
8
9
9
Parser operators can parse a severity and attach the resulting value to a log entry.
10
10
11
-
| Field | Default | Description |
12
-
| --- | --- | --- |
13
-
|`parse_from`| required | The [field](../types/field.md) from which the value will be parsed. |
14
-
|`preset`|`default`| A predefined set of values that should be interpretted at specific severity levels. |
15
-
|`mapping`|| A custom set of values that should be interpretted at designated severity levels. |
16
-
11
+
| Field | Default | Description |
12
+
| --- | --- | --- |
13
+
|`parse_from`| required | The [field](../types/field.md) from which the value will be parsed. |
14
+
|`preset`|`default`| A predefined set of values that should be interpretted at specific severity levels. |
15
+
|`mapping`|| A custom set of values that should be interpretted at designated severity levels. |
16
+
|`overwrite_with`|`false`| If `true`, the severity text will be set to the [recommeneded short name](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#displaying-severity) corresponding to the severity number. |
17
+
18
+
Note that by default the severity _text_ will be set to the original value which was interpreted into a severity number. In order to set the severity text to a standard short name (e.g. `ERROR`, `INFO3`, etc.), set `overwrite_with` to `true`.
0 commit comments