Skip to content

Commit

Permalink
Update Kubernetes examples to fix native OTel logs collection issue w…
Browse files Browse the repository at this point in the history
…here 0 length logs cause errors (#9754)

* Update Kubernetes examples to fix native OTel logs collection issue where 0 length logs cause errors

* patch

Co-authored-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
jvoravong and Alex Boten committed May 5, 2022
1 parent aca7b2f commit 4a245c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -46,6 +46,7 @@
- `examples/demo`: fix baggage not work in trace demo app. (#9418)
- `prometheusreceiver`: Handle the condition where `up` metric value is NaN (#9253)
- `tanzuobservabilityexporter`: Make metrics stanza in config be optional (#9098)
- `filelogreceiver`: Update Kubernetes examples to fix native OTel logs collection issue where 0 length logs cause errors (#9754)

## v0.50.0

Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/otel-collector-config.yml
Expand Up @@ -22,7 +22,7 @@ receivers:
# Parse CRI-O format
- type: regex_parser
id: parser-crio
regex: '^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) (?P<log>.*)$'
regex: '^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$'
output: extract_metadata_from_filepath
timestamp:
parse_from: attributes.time
Expand All @@ -31,7 +31,7 @@ receivers:
# Parse CRI-Containerd format
- type: regex_parser
id: parser-containerd
regex: '^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) (?P<log>.*)$'
regex: '^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$'
output: extract_metadata_from_filepath
timestamp:
parse_from: attributes.time
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/otel-collector.yaml
Expand Up @@ -29,7 +29,7 @@ data:
# Parse CRI-O format
- type: regex_parser
id: parser-crio
regex: '^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) (?P<log>.*)$'
regex: '^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$'
output: extract_metadata_from_filepath
timestamp:
parse_from: attributes.time
Expand All @@ -38,7 +38,7 @@ data:
# Parse CRI-Containerd format
- type: regex_parser
id: parser-containerd
regex: '^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) (?P<log>.*)$'
regex: '^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$'
output: extract_metadata_from_filepath
timestamp:
parse_from: attributes.time
Expand Down

0 comments on commit 4a245c6

Please sign in to comment.