From e9a27c631454b5d922c6ec03141e3f69968a8dc0 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 19 May 2026 16:14:32 +1000 Subject: [PATCH] otelcol: drop unparseable container logs quietly + filter nil container.name Filelog 'container' operator hits add_metadata_from_filepath failures during container churn and logs them at error level. otelcol then tails its own stderr via filelog and re-ships those errors, ~10x amplification per failure (stack traces). on_error: drop_quiet silences and drops the failed entry; updated filter expr drops entries with nil container.name as a safety net. Mirrors blob-devnets#15. --- ansible/inventories/devnet-3/group_vars/all/all.yaml | 3 ++- ansible/inventories/devnet-6/group_vars/all/all.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/inventories/devnet-3/group_vars/all/all.yaml b/ansible/inventories/devnet-3/group_vars/all/all.yaml index f3840a4..81b6f58 100644 --- a/ansible/inventories/devnet-3/group_vars/all/all.yaml +++ b/ansible/inventories/devnet-3/group_vars/all/all.yaml @@ -335,8 +335,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 diff --git a/ansible/inventories/devnet-6/group_vars/all/all.yaml b/ansible/inventories/devnet-6/group_vars/all/all.yaml index ca58920..2503f99 100644 --- a/ansible/inventories/devnet-6/group_vars/all/all.yaml +++ b/ansible/inventories/devnet-6/group_vars/all/all.yaml @@ -369,8 +369,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