Skip to content

Commit 6930a05

Browse files
committed
reformat of code blocks for getting started guide
1 parent ba295bb commit 6930a05

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

content/en/getting_started/tagging/unified_service_tagging.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ further_reading:
1313
---
1414

1515
## Overview
16-
Unified service tagging ties Datadog telemetry together through the use of three [reserved tags][1]: `env`, `service`, and `version`. With these three tags you can:
16+
Unified service tagging ties Datadog telemetry together through the use of three [reserved tags][1]: `env`, `service`, and `version`.
17+
18+
With these three tags you can:
1719

1820
- Identify deployment impact with trace and container metrics filtered by version
1921
- Navigate seamlessly across traces, metrics, and logs with consistent tags
@@ -94,12 +96,12 @@ template:
9496
To configure pod-level metrics, add the following standard labels (`tags.datadoghq.com`) to the pod spec of a Deployment, StatefulSet, or Job:
9597

9698
```yaml
97-
template:
98-
metadata:
99-
labels:
100-
tags.datadoghq.com/env: <ENV>
101-
tags.datadoghq.com/service: <SERVICE>
102-
tags.datadoghq.com/version: <VERSION>
99+
template:
100+
metadata:
101+
labels:
102+
tags.datadoghq.com/env: <ENV>
103+
tags.datadoghq.com/service: <SERVICE>
104+
tags.datadoghq.com/version: <VERSION>
103105
```
104106
These labels cover pod-level Kubernetes CPU, memory, network, and disk metrics, and can be used for injecting `DD_ENV`, `DD_SERVICE`, and `DD_VERSION` into your service's container through [Kubernetes's downward API][1].
105107

@@ -137,21 +139,21 @@ spec:
137139
To configure [APM Tracer][3] and [StatsD client][4] environment variables, use the [Kubernetes's downward API][1] in the format below:
138140

139141
```yaml
140-
containers:
141-
- ...
142-
env:
143-
- name: DD_ENV
144-
valueFrom:
145-
fieldRef:
146-
fieldPath: metadata.labels['tags.datadoghq.com/env']
147-
- name: DD_SERVICE
148-
valueFrom:
149-
fieldRef:
150-
fieldPath: metadata.labels['tags.datadoghq.com/service']
151-
- name: DD_VERSION
152-
valueFrom:
153-
fieldRef:
154-
fieldPath: metadata.labels['tags.datadoghq.com/version']
142+
containers:
143+
- ...
144+
env:
145+
- name: DD_ENV
146+
valueFrom:
147+
fieldRef:
148+
fieldPath: metadata.labels['tags.datadoghq.com/env']
149+
- name: DD_SERVICE
150+
valueFrom:
151+
fieldRef:
152+
fieldPath: metadata.labels['tags.datadoghq.com/service']
153+
- name: DD_VERSION
154+
valueFrom:
155+
fieldRef:
156+
fieldPath: metadata.labels['tags.datadoghq.com/version']
155157
```
156158

157159
[1]: https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#the-downward-api
@@ -213,7 +215,7 @@ As explained in the full configuration, these labels can be set in a Dockerfile
213215

214216
Set the `DD_ENV`, `DD_SERVICE`, and `DD_VERSION` environment variables and corresponding Docker labels in your container's runtime environment to your get the full range of unified service tagging. For instance, you can set all of this configuration in one place through your ECS task definition:
215217

216-
```json
218+
```
217219
"environment": [
218220
{
219221
"name": "DD_ENV",
@@ -227,19 +229,20 @@ Set the `DD_ENV`, `DD_SERVICE`, and `DD_VERSION` environment variables and corre
227229
"name": "DD_VERSION",
228230
"value": "<VERSION>"
229231
}
230-
]
231232
232233
"dockerLabels": {
233234
"com.datadoghq.tags.env": "<ENV>",
234235
"com.datadoghq.tags.service": "<SERVICE>",
235236
"com.datadoghq.tags.version": "<VERSION>"
237+
}
238+
]
236239
```
237240

238241
##### Partial configuration
239242

240243
If your service has no need for the Datadog environment variables (for example, third party software like Redis, PostgreSQL, NGINX, and applications not traced by APM) you can just use the Docker labels in your ECS task definition:
241244

242-
```json
245+
```
243246
"dockerLabels": {
244247
"com.datadoghq.tags.env": "<ENV>",
245248
"com.datadoghq.tags.service": "<SERVICE>",

0 commit comments

Comments
 (0)