Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter_log_to_metrics: add new option discard_logs and code cleanup
By default, the filter don't drop the logs from the pipeline, there are cases where only metrics are desired to reduce log volume. This patch introduces a new option called discard_logs (default: false) which when enabled will discard the logs once they are processed. In addition, other changes were made: - replacement of flb_malloc() with flb_calloc() - context structure definition changes: e.g: do not malloc ints - fix double free on cmetrics context destroy (histograms) - general cleanups... NOTE: I noticed that record accessor contexts are being created for fixed patterns (e.g: $kubernetes['pod_name']), we will need to fix this since the creation of those contexts are expensive, is times better to have them in the context and use it on demand. Signed-off-by: Eduardo Silva <[email protected]>
- Loading branch information