Skip to content

Commit

Permalink
add language detection apm config
Browse files Browse the repository at this point in the history
  • Loading branch information
adel121 committed Apr 3, 2024
1 parent fb82af4 commit 90d304b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 4 deletions.
4 changes: 4 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Datadog changelog

## 3.59.4

* Add language detection enable option for `APM` instrumentation.

## 3.59.3
* Add `contimage-intake.datadoghq.com` & `contlcycle-intake.datadoghq.com` endpoints to the `Agent` cilium network policy.

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.59.3
version: 3.59.4
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
3 changes: 2 additions & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.59.3](https://img.shields.io/badge/Version-3.59.3-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.59.4](https://img.shields.io/badge/Version-3.59.4-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 Expand Up @@ -665,6 +665,7 @@ helm install <RELEASE_NAME> \
| datadog.apm.instrumentation.disabledNamespaces | list | `[]` | Disable injecting the Datadog APM libraries into pods in specific namespaces (beta). |
| datadog.apm.instrumentation.enabled | bool | `false` | Enable injecting the Datadog APM libraries into all pods in the cluster (beta). |
| datadog.apm.instrumentation.enabledNamespaces | list | `[]` | Enable injecting the Datadog APM libraries into pods in specific namespaces (beta). |
| datadog.apm.instrumentation.language_detection.enabled | bool | `true` | Run language detection to automatically detect languages of user workloads (beta). |
| datadog.apm.instrumentation.libVersions | object | `{}` | Inject specific version of tracing libraries with Single Step Instrumentation (beta). |
| datadog.apm.port | int | `8126` | Override the trace Agent port |
| datadog.apm.portEnabled | bool | `false` | Enable APM over TCP communication (hostPort 8126 by default) |
Expand Down
5 changes: 3 additions & 2 deletions charts/datadog/templates/_components-common-env.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# The purpose of this template is to define a minimal set of environment
# variables shared between components: agent, cluster-agent
{{- define "components-common-env" -}}
# Workaround for issue in `7.52.0` default activating language detection
- name: DD_LANGUAGE_DETECTION_ENABLED
value: {{ (and .Values.datadog.apm.instrumentation.enabled .Values.datadog.apm.instrumentation.language_detection.enabled) | quote }}
- name: DD_LANGUAGE_DETECTION_REPORTING_ENABLED
value: "false"
value: {{ (and .Values.datadog.apm.instrumentation.enabled .Values.datadog.apm.instrumentation.language_detection.enabled) | quote }}
{{- if .Values.datadog.secretBackend.command }}
- name: DD_SECRET_BACKEND_COMMAND
value: {{ .Values.datadog.secretBackend.command | quote }}
Expand Down
4 changes: 4 additions & 0 deletions charts/datadog/templates/_container-process-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
{{- end }}
- name: DD_ORCHESTRATOR_EXPLORER_ENABLED
value: {{ (include "should-enable-k8s-resource-monitoring" .) | quote }}
{{- if and .Values.datadog.apm.instrumentation.enabled .Values.datadog.apm.instrumentation.language_detection.enabled }}
- name: DD_PROCESS_CONFIG_PROCESS_COLLECTION_ENABLED
value: "true"
{{- end }}
{{- include "additional-env-entries" .Values.agents.containers.processAgent.env | indent 4 }}
{{- include "additional-env-dict-entries" .Values.agents.containers.processAgent.envDict | indent 4 }}
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions charts/datadog/templates/cluster-agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ spec:
- name: DD_ORCHESTRATOR_EXPLORER_CONTAINER_SCRUBBING_ENABLED
value: {{ .Values.datadog.orchestratorExplorer.container_scrubbing.enabled | quote }}
{{- end }}
- name: DD_CLUSTER_AGENT_LANGUAGE_DETECTION_PATCHER_ENABLED
value: {{ (and .Values.datadog.apm.instrumentation.enabled .Values.datadog.apm.instrumentation.language_detection.enabled) | quote }}
{{- if eq (include "should-enable-security-agent" .) "true" }}
- name: DD_COMPLIANCE_CONFIG_ENABLED
value: {{ .Values.datadog.securityAgent.compliance.enabled | quote }}
Expand Down
11 changes: 11 additions & 0 deletions charts/datadog/templates/cluster-agent-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ rules:
- "get"
- "watch"
{{- end }}
{{- if and .Values.datadog.apm.instrumentation.enabled .Values.datadog.apm.instrumentation.language_detection.enabled }}
- apiGroups:
- "apps"
resources:
- deployments
verbs:
- list
- get
- watch
- patch
{{- end }}
{{- if eq (include "should-enable-k8s-resource-monitoring" .) "true" }}
- apiGroups: # to get the kube-system namespace UID and generate a cluster ID
- ""
Expand Down
7 changes: 7 additions & 0 deletions charts/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ datadog:

# datadog.apm.instrumentation.libVersions -- Inject specific version of tracing libraries with Single Step Instrumentation (beta).
libVersions: {}

# Language detection currently only detects languages and adds them as annotations on deployments, but doesn't use these languages for injecting libraries to applicative pods.
# It requires Agent 7.52+ and Cluster Agent 7.52+
language_detection:
# datadog.apm.instrumentation.language_detection.enabled -- Run language detection to automatically detect languages of user workloads (beta).
enabled: true

## OTLP ingest related configuration
otlp:
receiver:
Expand Down

0 comments on commit 90d304b

Please sign in to comment.