diff --git a/charts/nr-k8s-otel-collector/Chart.yaml b/charts/nr-k8s-otel-collector/Chart.yaml index 235a353b3c..42678b831a 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.10.8 +version: 0.10.9 dependencies: diff --git a/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml b/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml index 0cfca4cf9a..db669db929 100644 --- a/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/daemonset-configmap.yaml @@ -827,6 +827,11 @@ data: endpoint: {{ include "nrKubernetesOtel.endpoint" . }} headers: api-key: ${env:NR_LICENSE_KEY} + resource: + k8s.cluster.name: {{ include "newrelic.common.cluster" . }} + {{- range $k, $v := .Values.collectorObservability.resource }} + {{ $k }}: {{ $v }} + {{- end }} {{- end }} pipelines: {{- include "nrKubernetesOtel.daemonset.configMap.extraConfig.pipelines" . | nindent 8 }} diff --git a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml index f2e51b7ade..d3319501e0 100644 --- a/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml +++ b/charts/nr-k8s-otel-collector/templates/deployment-configmap.yaml @@ -804,6 +804,11 @@ data: endpoint: {{ include "nrKubernetesOtel.endpoint" . }} headers: api-key: ${env:NR_LICENSE_KEY} + resource: + k8s.cluster.name: {{ include "newrelic.common.cluster" . }} + {{- range $k, $v := .Values.collectorObservability.resource }} + {{ $k }}: {{ $v }} + {{- end }} {{- end }} pipelines: {{- include "nrKubernetesOtel.deployment.configMap.extraConfig.pipelines" . | nindent 8 }} diff --git a/charts/nr-k8s-otel-collector/values.yaml b/charts/nr-k8s-otel-collector/values.yaml index ef999a7146..2039656a4b 100644 --- a/charts/nr-k8s-otel-collector/values.yaml +++ b/charts/nr-k8s-otel-collector/values.yaml @@ -332,9 +332,18 @@ collectorObservability: # -- (bool) Specifies whether the collector reports its own metrics # @default -- `false` enabled: false - # -- Specifies the interval at which the collector reports its metrics (in milliseconds) - # @default -- `60000` - scrapeIntervalMs: 60000 + # -- Specifies the interval at which the collector reports its metrics (in seconds) + # @default -- `60` + scrapeIntervalSeconds: 60 + # -- Additional resource attributes to attach to its internal metrics. + # k8s.cluster.name is automatically populated from the cluster value. + # Useful for adding attributes such as env to distinguish between environments + # in multi-cluster deployments. + # Example: + # resource: + # env: production + # @default -- `{}` + resource: {} # -- (bool) Send only the [metrics required](https://github.com/newrelic/helm-charts/tree/master/charts/nr-k8s-otel-collector/docs/metrics-lowDataMode.md) to light up the NR kubernetes UI # @default -- `true`