Skip to content

Commit

Permalink
fix(otellogs): fix configuration due to issue
Browse files Browse the repository at this point in the history
issue: open-telemetry/opentelemetry-log-collection#415
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
  • Loading branch information
Dominik Rosiek committed Feb 28, 2022
1 parent 9801a90 commit cb2923f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4523,7 +4523,10 @@ otellogs:
type: recombine
output: extract-metadata-from-filepath
combine_field: log
is_first_entry: $$body.log matches "^\\d{4}-\\d{1,2}-\\d{1,2}.\\d{2}:\\d{2}:\\d{2}.*"
is_first_entry: $$body.log matches "^[^\\s]"
## Prefer the following regexp, when https://github.com/open-telemetry/opentelemetry-log-collection/issues/415
## will be resolved
# is_first_entry: $$body.log matches "^\\d{4}-\\d{1,2}-\\d{1,2}.\\d{2}:\\d{2}:\\d{2}.*"

## extract-metadata-from-filepath extracts data from the `file.path` Attribute into the Body, removing the `file.path` attribute.
## Input Attributes:
Expand Down Expand Up @@ -4626,9 +4629,9 @@ otellogs:
## The batch processor accepts spans and places them into batches grouped by node and resource
batch:
## Number of spans after which a batch will be sent regardless of time
## This is set to the same value as in the metadata enricher
## This is set to the 10240, to avoid loosing logs on the start of the collector
## TODO: Figure out what the optimal values should be for different configurations
send_batch_size: 256
send_batch_size: 10_240
## Time duration after which a batch will be sent regardless of size
timeout: 1s
daemonset:
Expand Down
4 changes: 2 additions & 2 deletions tests/helm/logs_otc/static/basic.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data:
health_check: {}
processors:
batch:
send_batch_size: 256
send_batch_size: 10240
timeout: 1s
receivers:
filelog/containers:
Expand Down Expand Up @@ -75,7 +75,7 @@ data:
type: recombine
- combine_field: log
id: merge-multiline-logs
is_first_entry: $$body.log matches "^\\d{4}-\\d{1,2}-\\d{1,2}.\\d{2}:\\d{2}:\\d{2}.*"
is_first_entry: $$body.log matches "^[^\\s]"
output: extract-metadata-from-filepath
type: recombine
- id: extract-metadata-from-filepath
Expand Down

0 comments on commit cb2923f

Please sign in to comment.