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

add combineWith to multiline options #993

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions .chloggen/recombine_with_field.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, networkExplorer, operator, chart, other)
component: agent
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add combineWith field to multiline configuration
# One or more tracking issues related to the change
issues: [756]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions docs/advanced-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ logsCollection:
containerName:
value: server
firstEntryRegex: ^[^\s].*
combineWith: ""
atoulme marked this conversation as resolved.
Show resolved Hide resolved
```

Use https://regex101.com/ to find a golang regex that works for your format and specify it in the config file for the config option `firstEntryRegex`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ receivers:
combine_field: attributes.log
is_first_entry: '(attributes.log) matches {{ .firstEntryRegex | quote }}'
max_log_size: {{ $.Values.logsCollection.containers.maxRecombineLogSize }}
combine_with: {{ .combineWith | default "\n" | quote }}
atoulme marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}
{{- end }}
# Clean up log record
Expand Down
1 change: 1 addition & 0 deletions helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ logsCollection:
# containerName:
# value: server
# firstEntryRegex: ^[^\s].*
# combineWith: ""
multilineConfigs: []
# Set useSplunkIncludeAnnotation flag to `true` to collect logs from pods with `splunk.com/include: true` annotation and ignore others.
# All other logs will be ignored.
Expand Down
Loading