Closed
Description
In working on -- and looking at -- simple enough issues (#771 and #697), I've noticed a few problems on how the plugin handles the DLQ.
Here are a few things I think we could tweak:
- Add a new attribute to configure additional statuses to DLQ (currently only on 400 and 404)
- This would solve situations like Make 403 response configurable for going into DLQ #697, Elasticsearch Output Drop Events Sent to Closed Index #134 (See also customer issues linked to Make 403 response configurable for going into DLQ #697)
- Deprecate & rename confusingly named
failure_type_logging_whitelist
. This is a list of error statuses we don't want to log. Perhaps an attribute namedsilence_
... - Encapsulate the DLQing in a small helper class
- Avoid the nil setting and checking business
- Messy logic in detecting status of DLQ would be encapsulated there, making plugins lack a proper API to understand if DLQ is enabled elastic/logstash#8064 less of an issue
- Sending to DLQ should also log (unless it's a status configured to be silenced), it shouldn't be DLQ vs log like it currently is.
- This encapsulation would help handle potential big changes to how the DLQ work, e.g. Internal pipelines as DLQ elastic/logstash#9502
- Consider sending events whose index has an interpolation failure to the DLQ, as suggested in DLQ when sprintf references a missing field #718
- Consider introducing a new metric for events sent to the DLQ, as suggested in [DLQ Improvements] Introduce a new metric to track how many events go to the DLQ #778.