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

otel: fix drop handling in insert #4583

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

alltilla
Copy link
Collaborator

@alltilla alltilla commented Aug 4, 2023

No description provided.

@bazsi
Copy link
Collaborator

bazsi commented Aug 6, 2023

This looks good, I was just wondering when can it happen that our formatter returns false?

@alltilla
Copy link
Collaborator Author

alltilla commented Aug 7, 2023

It fails if some of the .otel. or .otel_raw. fields are wrong, for example if the .otel.metric.data.type is not one of the valid values (gauge, sum, histogram, expontential_histogram or sum). This should not happen when we receive (and parse) with the opentelemetry() driver, only if a user tries to set those manually and makes an error. The processing of the OTel messages is very forgiving, we do partial formatting and parsing everywhere, so we can process incoming messages that lack mandatory fields, and we can create messages similarly.

Copy link
Collaborator

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of a real insert() failure, we should clear logs_service_request to avoid duplication as the threaded dest driver reinserts the discarded batch.

Currently, there is no such case, so I guess we're good.

@MrAnno MrAnno merged commit 1c31e25 into syslog-ng:master Aug 7, 2023
15 checks passed
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.

3 participants