From 3a6dd31b021fd785ee689237693718cd41904ad2 Mon Sep 17 00:00:00 2001 From: Daniel Budziwojski <135250101+dbudziwojskiNR@users.noreply.github.com> Date: Thu, 5 Sep 2024 08:10:43 -0700 Subject: [PATCH] [nr-k8s-otel-collector] Add event.source.host (#1461) #### Is this a new chart #### What this PR does / why we need it: #### Which issue this PR fixes *(optional, in `fixes #(, fixes #, ...)` format, will close that issue when PR gets merged)* - fixes # #### Special notes for your reviewer: #### Checklist [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] - [x] Chart Version bumped - [x] Variables are documented in the README.md - [x] Title of the PR starts with chart name (e.g. `[mychartname]`) --------- Co-authored-by: ramkrishankumarN <164395682+ramkrishankumarN@users.noreply.github.com> --- charts/nr-k8s-otel-collector/Chart.yaml | 2 +- .../templates/deployment-configmap.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/nr-k8s-otel-collector/Chart.yaml b/charts/nr-k8s-otel-collector/Chart.yaml index e8da89632..8c865e81c 100644 --- a/charts/nr-k8s-otel-collector/Chart.yaml +++ b/charts/nr-k8s-otel-collector/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.7.4 +version: 0.7.5 dependencies: - name: common-library diff --git a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml index c59bcb5e4..dd3d90ec6 100644 --- a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml @@ -445,6 +445,12 @@ data: action: upsert value: 'true' + transform/events: + log_statements: + - context: log + statements: + - set(attributes["event.source.host"], resource.attributes["k8s.node.name"]) + transform/low_data_mode_inator: metric_statements: - context: metric @@ -576,6 +582,7 @@ data: receivers: - k8s_events processors: + - transform/events - resource/events - batch exporters: