You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/containers/cluster_agent/admission_controller.md
+42-2Lines changed: 42 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,13 +128,47 @@ Finally, run the following commands:
128
128
-`kubectl apply -f agent-services.yaml`
129
129
-`kubectl apply -f cluster-agent-deployment.yaml`
130
130
131
-
### APM and DogStatsD
132
131
133
-
To configure DogstatsD clients and APM tracers automatically, inject the environment variables `DD_AGENT_HOST` and `DD_ENTITY_ID` by using one of the following:
132
+
### APM
133
+
You can configure the Cluster Agent (version 7.39 and higher) to inject APM tracing libraries automatically.
134
134
135
+
After you install the Cluster Agent, do one of the following:
135
136
- Add the label `admission.datadoghq.com/enabled: "true"` to your pod.
136
137
- Configure the Cluster Agent admission controller by setting `mutateUnlabelled` (or `DD_ADMISSION_CONTROLLER_MUTATE_UNLABELLED`, depending on your configuration method) to `true`.
137
138
139
+
To opt-in your container for library injection, use Pod annotations inside your application's YAML file to specify language tracers and versions.
140
+
141
+
142
+
The annotations are a `key: value` pair in the following format:
Adding a this annotation results in the injection of the tracer library for that language and version into the containerized application.
149
+
Valid `<language>` values are:
150
+
- `java`
151
+
- `js`
152
+
- `python`
153
+
154
+
For example to inject the latest Java tracer:
155
+
156
+
```yaml
157
+
annotations:
158
+
datadoghq.com/java-lib.version: "latest"
159
+
```
160
+
161
+
**Note**: Use caution specifying `latest` as major library releases can introduce breaking changes.
162
+
163
+
Although it's an uncommon scenario, you can add multiple `<language>-lib.version` annotations to inject multiple language tracers into one container.
164
+
165
+
For example to inject the latest Java tracer and Node tracer v3.0.0:
166
+
```yaml
167
+
annotations:
168
+
datadoghq.com/java-lib.version: "latest"
169
+
datadoghq.com/js-lib.version: "3.0.0"
170
+
```
171
+
138
172
To prevent pods from receiving environment variables, add the label `admission.datadoghq.com/enabled: "false"`. This works even if you set `mutateUnlabelled: true`.
| `false` | `admission.datadoghq.com/enabled=false` | No |
150
184
185
+
### DogStatsD
186
+
187
+
To configure DogStatsD clients or other APM libraries that do not support library injection, inject the environment variables `DD_AGENT_HOST` and `DD_ENTITY_ID` by doing one of the following:
188
+
- Add the label `admission.datadoghq.com/enabled: "true"` to your pod.
189
+
- Configure the Cluster Agent admission controller by setting `mutateUnlabelled` (or `DD_ADMISSION_CONTROLLER_MUTATE_UNLABELLED`, depending on your configuration method) to `true`.
190
+
151
191
152
192
#### Order of priority
153
193
The Datadog admission controller does not inject the environment variables `DD_VERSION`, `DD_ENV`, and `DD_SERVICE` if they already exist.
Copy file name to clipboardExpand all lines: content/en/containers/kubernetes/apm.md
+20-17Lines changed: 20 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -218,29 +218,31 @@ kind: Deployment
218
218
```
219
219
**Note:** This configuration requires the Agent to be configured to accept traces over TCP
220
220
221
-
[1]: /agent/cluster_agent/admission_controller/
222
221
222
+
[1]: /agent/cluster_agent/admission_controller/
223
223
{{% /tab %}}
224
224
225
225
{{< /tabs >}}
226
226
227
227
### Configure your application tracers to emit traces:
228
228
After configuring your Datadog Agent to collect traces and giving your application pods the configuration on *where* to send traces, install the Datadog Tracer into your applications to emit the traces. Once this is done, the tracer automatically sends the traces to the relative `DD_AGENT_HOST` (for `IP:Port`) or `DD_TRACE_AGENT_URL` (for UDS) endpoint.
229
229
230
-
Refer to the [language-specific APM instrumentation docs][2] for more examples.
230
+
For information about auto-injection of the libraries for supported languages, read [the APM section of the Admission Controller documentation][2].
231
+
232
+
Refer to the [language-specific APM instrumentation docs][3] for more examples.
231
233
232
234
233
235
## Agent environment variables
234
236
235
-
**Note**: As a best practice, Datadog recommends using unified service tagging when assigning tags. Unified service tagging ties Datadog telemetry together through the use of three standard tags: `env`, `service`, and `version`. To learn how to configure your environment with unified tagging, refer to the dedicated [unified service tagging][3] documentation.
237
+
**Note**: As a best practice, Datadog recommends using unified service tagging when assigning tags. Unified service tagging ties Datadog telemetry together through the use of three standard tags: `env`, `service`, and `version`. To learn how to configure your environment with unified tagging, refer to the dedicated [unified service tagging][4] documentation.
236
238
237
239
List of all environment variables available for tracing within the Agent running in Kubernetes:
| `DD_PROXY_HTTPS` | Set up the URL for the proxy to use. |
243
-
| `DD_APM_REPLACE_TAGS` | [Scrub sensitive data from your span’s tags][4]. |
245
+
| `DD_APM_REPLACE_TAGS` | [Scrub sensitive data from your span’s tags][5]. |
244
246
| `DD_HOSTNAME` | Manually set the hostname to use for metrics if autodetection fails, or when running the Datadog Cluster Agent. |
245
247
| `DD_DOGSTATSD_PORT` | Set the DogStatsD port. |
246
248
| `DD_APM_RECEIVER_SOCKET` | Collect your traces through a Unix Domain Sockets and takes priority over hostname and port configuration if set. Off by default, when set it must point to a valid sock file. |
@@ -252,17 +254,17 @@ List of all environment variables available for tracing within the Agent running
252
254
| `DD_APM_RECEIVER_PORT` | Port that the Datadog Agent's trace receiver listens on. Default value is `8126`. |
253
255
| `DD_APM_NON_LOCAL_TRAFFIC` | Allow non-local traffic when tracing from other containers. Default value is `true` (Agent 7.18+) |
254
256
| `DD_APM_IGNORE_RESOURCES` | Configure resources for the Agent to ignore. Format should be comma separated, regular expressions. Like <code>GET /ignore-me,(GET\|POST) /and-also-me</code>. |
255
-
| `DD_ENV` | Sets the global `env` for all data emitted by the Agent. If `env` is not present in your trace data, this variable is used. See [APM environment setup][5] for more details.
257
+
| `DD_ENV` | Sets the global `env` for all data emitted by the Agent. If `env` is not present in your trace data, this variable is used. See [APM environment setup][6] for more details.
| `agent.apm.enabled` | Enable this to enable APM and tracing, on port 8126. See the [Datadog Docker documentation][6]. |
262
-
| `agent.apm.env` | The Datadog Agent supports many [environment variables][7]. |
263
+
| `agent.apm.enabled` | Enable this to enable APM and tracing, on port 8126. See the [Datadog Docker documentation][7]. |
264
+
| `agent.apm.env` | The Datadog Agent supports many [environment variables][8]. |
263
265
| `agent.apm.hostPort` | Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If `HostNetwork` is specified, this must match `ContainerPort`. Most containers do not need this. |
264
-
| `agent.apm.resources.limits` | Limits describes the maximum amount of compute resources allowed. For more info, see the [Kubernetes documentation][8]. |
265
-
| `agent.apm.resources.requests` | Requests describes the minimum amount of compute resources required. If `requests` is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. For more info, see the [Kubernetes documentation][8]. | |
266
+
| `agent.apm.resources.limits` | Limits describes the maximum amount of compute resources allowed. For more info, see the [Kubernetes documentation][9]. |
267
+
| `agent.apm.resources.requests` | Requests describes the minimum amount of compute resources required. If `requests` is omitted for a container, it defaults to `limits` if that is explicitly specified, otherwise to an implementation-defined value. For more info, see the [Kubernetes documentation][9]. | |
266
268
267
269
268
270
## Further Reading
@@ -271,10 +273,11 @@ List of all environment variables available for tracing within the Agent running
0 commit comments