From 46d96585f39ec1bfb99f530bb321dc8733516480 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 19 May 2026 16:12:19 +1000 Subject: [PATCH] otelcol: drop unparseable container logs quietly + filter nil container.name The filelog 'container' operator hits add_metadata_from_filepath failures during container churn and logs them at error. Those errors then re-enter the pipeline via filelog tailing otelcol's own stderr, multiplying volume ~10x per failure (stack traces). Adds on_error: drop_quiet to silence and drop the failed entry; updates the exclude filter to also drop entries with nil container.name as a safety net. --- ansible/inventories/devnet-0/group_vars/all/all.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/inventories/devnet-0/group_vars/all/all.yaml b/ansible/inventories/devnet-0/group_vars/all/all.yaml index e330ccf..2bf24e5 100644 --- a/ansible/inventories/devnet-0/group_vars/all/all.yaml +++ b/ansible/inventories/devnet-0/group_vars/all/all.yaml @@ -357,8 +357,9 @@ otelcol_contrib_config: | - type: container format: docker add_metadata_from_filepath: true + on_error: drop_quiet - type: filter - expr: 'attributes["container.name"] != nil and attributes["container.name"] matches "^(otelcol|ethereum-metrics-exporter|nginx-proxy|node_exporter|prometheus|snooper-.*)$"' + expr: 'attributes["container.name"] == nil or attributes["container.name"] matches "^(otelcol|ethereum-metrics-exporter|nginx-proxy|node_exporter|prometheus|snooper-.*)$"' - type: json_parser if: 'body matches "^\\s*\\{"' on_error: send