-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/kafka] Send individual LogRecords #12623
Comments
Pinging code owners: @pavolloffay @MovieStoreGuy |
As far as I can see, other exporters also extract individual LogRecords and send it: clickhouseexporter, elasticsearchexporter, lokiexporter. |
An individual "log record" is incorrect to be sent, since lots of informations about that record are in the Resource and Scope. /cc @tigrannajaryan |
One way sending individual log records would be acceptable is if somehow the Resource and Scope information was merged into the LogRecord. Essentially have a flat record which contains all the information. That however would be a totally different encoding, different from the
This is a choice vendor specific exporters are free to make. Kafka exporter can't make such a choice for OTLP encodings since that would mean loosing data. One possible option would be to add support for other Another alternate option is to use batch processor with send_batch_max_size = 1 to ensure every emitted Kafka record contains only one LogRecord. |
Resource and Scope attributes could be merged into LogRecord attributes (in attribute processor, for example). |
Right, that is what I'm proposing - to have different encodings: |
That could be an option, but I think problem is nested structure with arrays []ResourceLog:[]ScopeLog:[]LogRecords, which is unnecessary in this case. As noticed above, many exporters implement sending individual LogRecords and have such 3 'for' loops pattern. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Is your feature request related to a problem? Please describe.
Current implementation of of Kafka exporter sends complete ResourceLogs, which consists of ScopeLogs, which consists of LogRecords.
So instead of sending individual LogRecords, it sents structure of 3 nested levels.
It requires storage behind Kafka to store such complex structure.
Describe the solution you'd like
This proposal is to send individual LogRecords.
One LogRecord per sarama.ProducerMessage.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: