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

Fix native OTel logs collection where 0 length logs cause errors #451

Merged
merged 2 commits into from
May 4, 2022
Merged

Fix native OTel logs collection where 0 length logs cause errors #451

merged 2 commits into from
May 4, 2022

Conversation

jvoravong
Copy link
Contributor

@jvoravong jvoravong commented May 4, 2022

Fix native OTel logs collection where 0 length log lines cause errors after the 0.29.0 opentelemetry-logs-library changes in v0.49.0 of the collector.

Testing:
Verified this is only an issue with v0.49.0 of the collector 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":""}}

If these changes are merged, I plan on submitting a PR for the opentelemetry-collector-contrib example that is related.

@jvoravong jvoravong requested review from a team as code owners May 4, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants