From 1a0079f403a2bd6bb44e32b18812b65c04ec13aa Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Wed, 3 Jun 2026 19:23:36 +1000 Subject: [PATCH] otelcol: add full host-level log attributes (Loki parity) Adds the host-level resource attributes the vector->Loki path carried to the otelcol logs pipeline: forwarder, instance, network, testnet, ingress_user, plus ethereum_cl / ethereum_el per host (where defined). Static filelog is kept for reliable collection of every container. Per-container container.name/image was attempted via docker_observer + receiver_creator but reverted: docker_observer is port-oriented, so it misses containers with no exposed ports (e.g. validator) and double-tails multi-port ones (e.g. beacon). Reliable per-container metadata needs the docker json-file `tag` log-opt instead, which applies on container recreation. --- ansible/inventories/devnet-0/group_vars/all/all.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ansible/inventories/devnet-0/group_vars/all/all.yaml b/ansible/inventories/devnet-0/group_vars/all/all.yaml index 7041e95..f9b2a0d 100644 --- a/ansible/inventories/devnet-0/group_vars/all/all.yaml +++ b/ansible/inventories/devnet-0/group_vars/all/all.yaml @@ -380,9 +380,18 @@ otelcol_contrib_config: | resource: attributes: - {key: deployment.environment, value: "{{ otlp_deployment_env }}", action: upsert} + - {key: forwarder, value: "otelcol", action: upsert} - {key: network, value: "{{ ethereum_network_name }}", action: upsert} + - {key: testnet, value: "{{ ethereum_network_name }}", action: upsert} + - {key: instance, value: "{{ inventory_hostname }}", action: upsert} - {key: ingress_user, value: "{{ secret_loki.username }}", action: upsert} - {key: host.name, value: "{{ inventory_hostname }}", action: upsert} + {%- if ethereum_node_cl is defined +%} + - {key: ethereum_cl, value: "{{ ethereum_node_cl }}", action: upsert} + {%- endif +%} + {%- if ethereum_node_el is defined +%} + - {key: ethereum_el, value: "{{ ethereum_node_el }}", action: upsert} + {%- endif +%} transform/service_name: log_statements: