Skip to content

Commit

Permalink
fix(datadog-agent): Properly set DD_APM_ENABLED in the core agent con…
Browse files Browse the repository at this point in the history
…tainer (#1310)

The `DD_APM_ENABLED` value has always been hardcoded to `false` in the core agent
container, leading to situations where APM is indeed enabled and the value of
`apm.enabled` is set to false in the core agent and true in the trace agent. This
hasn't been an issue until we started reporting the agent configuration to the backend,
and to display it in the UI. The agent configuration is reported from the core agent,
meaning that customers will see `apm.enabled: false` in the UI even if the trace agent
exists.

Here we fix this by setting DD_APM_ENABLED to true in the core agent if the trace agent
exists or if APM is enabled. The latter should imply the former, but this makes the logic
future-proof.
  • Loading branch information
BaptisteFoy authored Feb 13, 2024
1 parent 2e320f7 commit 8d1dd1f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Datadog changelog

## 3.54.2

* Set `DD_APM_ENABLED` value in the core agent container to properly report its value.

## 3.54.1

* Migrate from `kubeval` to `kubeconform` for ci chart validation.
Expand Down Expand Up @@ -90,7 +94,7 @@ Get rid of the old GODEBUG=x509ignoreCN=0 hack that is not effective anymore in

## 3.49.2

* Fix check for APM Instrumentation when apm.intrumentation.disabledNamespaces is set
* Fix check for APM Instrumentation when apm.intrumentation.disabledNamespaces is set

## 3.49.1

Expand Down Expand Up @@ -147,7 +151,7 @@ Get rid of the old GODEBUG=x509ignoreCN=0 hack that is not effective anymore in

## 3.42.1

* Bump FIPS proxy OpenSSL version to 3.0.12
* Bump FIPS proxy OpenSSL version to 3.0.12

## 3.42.0

Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 3.54.1
version: 3.54.2
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.54.1](https://img.shields.io/badge/Version-3.54.1-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.54.2](https://img.shields.io/badge/Version-3.54.2-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)

[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).

Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/templates/_container-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
{{- include "containers-cluster-agent-env" . | nindent 4 }}
{{- end }}
- name: DD_APM_ENABLED
value: "false"
value: {{ include "should-enable-trace-agent" . | quote }}
- name: DD_LOGS_ENABLED
value: {{ (default false (or .Values.datadog.logs.enabled .Values.datadog.logsEnabled)) | quote}}
- name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
Expand Down

0 comments on commit 8d1dd1f

Please sign in to comment.