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

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

Merged
merged 3 commits into from
May 5, 2022

Conversation

jvoravong
Copy link
Contributor

Description:
Updating these examples to avoid an issue that was introduced in opentelemetry-collector-contrib v0.49.0 due to opentelemetry-log-collection v0.29.0.

Without this change, a collector using the filelog receiver (Otel Native Logs) with these configuration examples to collect logs from containerd or cri-o environments will throw an error when an empty line is encountered within a multiline log entry.

Link to tracking Issue:
Didn't create an issue in this repo for this small change.

Here is link to the fix being applied to a distribution I contribute to.
signalfx/splunk-otel-collector-chart#451

Testing:
Verified this is only an issue with v0.49.0 and after.

Example:
An application logs an error stack trace like such:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
...

The collector will throw an error like such:

2022-05-03T20:44:50.359Z error helper/transformer.go:110 Failed to process entry {"kind": "receiver", "name": "filelog", "operator_id": "parser-containerd", "operator_type": "regex_parser", "error": "regex pattern does not match", "action": "send", "entry": {"observed_timestamp":"2022-05-03T20:44:50.359464261Z","timestamp":"0001-01-01T00:00:00Z","body":"2022-05-03T20:44:36.873466616Z stderr F","attributes":{"log.file.path":"/var/log/pods/xxxx/server/0.log"},"severity":0,"scope_name":""}}

@jvoravong jvoravong requested review from a team and pmm-sumo May 5, 2022 17:24
@jvoravong jvoravong changed the title Update examples to fix native OTel logs collection issue where 0 length logs cause errors Update Kubernetes examples to fix native OTel logs collection issue where 0 length logs cause errors May 5, 2022
@dmitryax dmitryax added the ready to merge Code review completed; ready to merge by maintainers label May 5, 2022
@bogdandrutu bogdandrutu merged commit 4a245c6 into open-telemetry:main May 5, 2022
djaglowski pushed a commit to djaglowski/opentelemetry-collector-contrib that referenced this pull request May 10, 2022
…here 0 length logs cause errors (open-telemetry#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>
@jvoravong jvoravong deleted the otel-log-bug-fix branch May 31, 2022 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants