Open bjg2 opened 1 month ago
@bjg2 Thanks for the report. Sorry I haven't made time for #4258.
Looks like this is an issue of fluent-plugin-mongo
.
I would like to be able to drop the logs that are problem with separate setting than database insert retrying (similar question here as well https://github.com/fluent/fluentd/issues/4258),
Fluentd has the feature: https://docs.fluentd.org/buffer#handling-unrecoverable-errors
However, looks like fluent-plugin-mongo
does not handle the error BSON::Error::UnserializableClass
as unrecoverable.
Thanks!
So, as far as I understand, these are probably issues for fluent-plugin-mongo (at least to tag the errors as unrecoverable)? But also, as far as I can see their github is not responsive https://github.com/fluent/fluent-plugin-mongo Any idea on the best next steps?
Thanks again!
Describe the bug
Flushing the buffer fails with
BSON::Error::UnserializableClass error="Value does not define its BSON serialized type: 1721203518"
.I don't think it is related to the value mentioned in the string though, probably to the value in the 'to reproduce' part: -9223372036854776000. That is just a bit under -2^63, so it cannot be represented via long long, I guess ruby is using some weird type to represent it and does not know how to map that type to BSON value.
To Reproduce
Not as easy to reproduce, however, i had this log leave my application:
{"agent":"Go-http-client/1.1","boltName":"worker","clientTime":"2024-07-17T07:16:00.310Z","height":0,"host":"------","ip":"------","level":"warning","log":"BAJKA MOJ","renderHeight":-9223372036854776000,"renderWidth":1080,"smallerEdgeSize":1080,"time":"2024-07-17T07:16:00.331Z","width":0}
and similarily, in fluentd buffer it turned into this line
2024-07-17T07:19:54.549069355Z stdout F {"agent":"Go-http-client/1.1","boltName":"worker","clientTime":"2024-07-17T07:16:00.310Z","height":0,"host":"------","ip":"------","level":"warning","log":"BAJKA MOJ","renderHeight":-9223372036854776000,"renderWidth":1080,"smallerEdgeSize":1080,"time":"2024-07-17T07:16:00.331Z","width":0}
Expected behavior
To flush the buffer.
Your Environment
Your Configuration
Your Error Log
Additional context
Since logging that line almost none other logs were sent to the database. I have retry_forever set to true, not to lose logs if database is unreachable or in some kind of problem, but I would like to retry only on database and connection issues, not on this kind of issues.
I would like to be able to drop the logs that are problem with separate setting than database insert retrying (similar question here as well https://github.com/fluent/fluentd/issues/4258),