Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change log level in eventlogmessage #2336

Merged
merged 4 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Main (unreleased)

- Fixed an issue where the `otelcol.processor.interval` could not be used because the debug metrics were not set to default. (@wildum)

- Change the log level in the `eventlogmessage` stage of the `loki.process` component from `warn` to `debug`. (@wildum)

### Other changes

- Change the stability of the `livedebugging` feature from "experimental" to "generally available". (@wildum)
Expand Down
3 changes: 3 additions & 0 deletions docs/sources/reference/components/loki/loki.process.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ If set to `false`, the `_extracted` suffix will be appended to an already existi
When `drop_invalid_labels` is set to `true`, the stage drops fields that are not valid label names.
If set to `false`, the stage will automatically convert them into valid labels replacing invalid characters with underscores.

Only lines that have the key:value format will be extracted. All non-alpha characters in the key are replaced with underscores.
For example, `\tSecurity ID` will be available in the extracted map as `_Security_ID` to be used in later stages.
wildum marked this conversation as resolved.
Show resolved Hide resolved

#### Example combined with `stage.json`

```alloy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (m *eventLogMessageStage) processEntry(extracted map[string]interface{}, ke
for _, line := range lines {
parts := strings.SplitN(line, ":", 2)
if len(parts) < 2 {
level.Warn(m.logger).Log("msg", "invalid line parsed from message", "line", line)
level.Debug(m.logger).Log("msg", "invalid line parsed from message", "line", line)
continue
}
mkey := parts[0]
Expand Down
Loading