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: articles/container-apps/opentelemetry-agents.md
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn to record and query data collected using OpenTelemetry in Azu
4
4
services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: container-apps
7
-
ms.date: 03/07/2024
7
+
ms.date: 03/08/2024
8
8
ms.author: cshoe
9
9
---
10
10
@@ -29,9 +29,9 @@ Through simple configuration settings, the Container Apps OTel agent makes it ea
29
29
- Send data to one or multiple destinations
30
30
- Switch collection destinations
31
31
32
-
This article shows you how to setup and configure an OTel agent for your container app.
32
+
This article shows you how to set up and configure an OTel agent for your container app.
33
33
34
-
## Set up a agent
34
+
## Set up an agent
35
35
36
36
Setting up an agent is a two step process. The first step is to create an instance of the destination service to accept data from your container app. For instance, if you want to send data to Azure Application Insights, you first need to create an App Insights instance.
37
37
@@ -106,7 +106,7 @@ Once you have these configuration details, you can configure the agent via your
106
106
107
107
---
108
108
109
-
## OLTP endpoint
109
+
## OTLP endpoint
110
110
111
111
An OpenTelemetry protocol (OTLP) endpoint is a telemetry data destination that consumes OpenTelemery data. You can use existing solutions that support OTLP, or develop your own according to the OpenTelemetry protocol.
112
112
@@ -135,22 +135,27 @@ While you can set up as many OTLP-configured endpoints as you like, each endpoin
135
135
136
136
| Name | Description |
137
137
|---|---|
138
-
|`name`|The name of your OTLP-configured endpoint |
139
-
|`endpoint`| The URL to receive the data |
140
-
|`header`| List of any headers used for security|
138
+
|`name`|A name you select to identify your OTLP-configured endpoint.|
139
+
|`endpoint`| The URL of the destination that receives collected data.|
140
+
|`header`| List of security headers.|
141
141
|`insecure`| True/false. If false, include headers to |
142
142
143
143
# [Azure CLI](#tab/azure-cli)
144
144
145
145
```azurecli
146
146
az containerapp env telemetry otlp add \
147
147
--name <ENDPOINT_NAME> \
148
-
--endpoint <ENDPOINT_URI> \
149
-
--insecure <TRUE/FALSE>
148
+
--endpoint <ENDPOINT_URL> \
149
+
--insecure <IS_INSECURE>
150
150
--headers <HEADERS>
151
151
```
152
152
153
-
TODO
153
+
| Name | Description |
154
+
|---|---|
155
+
|`<ENDPOINT_NAME>`| A name you select to identify your OTLP-configured endpoint. |
156
+
|`<ENDPOINT_URL>`| The URL of the destination that receives collected data. |
157
+
|`<IS_INSECURE>`| True/false. If false, include headers to |
158
+
|`<HEADERS>`| List of security headers. |
154
159
155
160
---
156
161
@@ -169,9 +174,9 @@ The OTel agent divides data up into the following categories:
169
174
- Metrics
170
175
- Logs
171
176
172
-
You can send each type of data to different locations, but you can also choose not to send one of the data categories a agent.
177
+
You can send each type of data to different locations, but you can also choose not to send one of the data categories an agent.
173
178
174
-
To configure a agent, use the `destinations` array to define which agents your application sends data. Valid keys are either `appInsights`, `dataDog`, or the name of your custom OTLP endpoint.
179
+
To configure an agent, use the `destinations` array to define which agents your application sends data. Valid keys are either `appInsights`, `dataDog`, or the name of your custom OTLP endpoint.
175
180
176
181
The following example shows how to use an OTLP endpoint named `customDashboard`.
177
182
@@ -209,7 +214,6 @@ The following example shows how to use an OTLP endpoint named `customDashboard`.
209
214
210
215
The following example show how you might configure your container app to collect telemetry data using Azure Application Insights, Datadog, and with a custom OTLP agent named `customDashboard`.
211
216
212
-
213
217
# [ARM template](#tab/arm)
214
218
215
219
```json
@@ -229,7 +233,7 @@ The following example show how you might configure your container app to collect
229
233
"otlpConfigurations": [
230
234
{
231
235
"name": "customDashboard",
232
-
"endpoint": "<OLTP_ENDPOINT_URI>",
236
+
"endpoint": "<OTLP_ENDPOINT_URI>",
233
237
"insecure": true
234
238
}
235
239
]
@@ -259,40 +263,35 @@ The following example show how you might configure your container app to collect
259
263
260
264
# [CLI](#tab/cli)
261
265
262
-
Use a combination of commands with `az containerapp env telemetry` that match the type of agent you want to enable.
266
+
Use a combination of commands with `az containerapp env telemetry` that match the type of agent you want to enable. The following table lists the agents you can enable.
263
267
264
268
| Command | Description |
265
269
|---|---|
266
270
|`app-insights`| Application Insights agent |
267
271
|`data-dog`| Datadog agent |
268
272
|`otlp`| Custom OTLP agent |
269
273
274
+
Once you select an agent, then you can enable the type of data you want to collect. The following table lists the parameters available to enable or disable different categories of data to collect.
270
275
276
+
| Parameter | Value |
277
+
|---|---|
278
+
|`--enable-open-telemetry-traces`|`true` or `false`|
279
+
|`--enable-open-telemetry-logs`|`true` or `false`|
280
+
|`--enable-open-telemetry-metrics`|`true` or `false`|
271
281
272
-
| Parameter | Value | Description |
273
-
|---|---|---|
274
-
|`--enable-open-telemetry-traces`|`true` or `false`||
275
-
|`--enable-open-telemetry-logs`|`true` or `false`||
276
-
|`--enable-open-telemetry-metrics`|`true` or `false`||
282
+
For example, if you wanted to start collecting traces and logs with Application Insights you would use the following command.
277
283
284
+
```azurecli
278
285
az containerapp env telemetry app-insights set
279
286
--enable-open-telemetry-traces true
280
287
--enable-open-telemetry-logs true
281
-
282
-
az containerapp env telemetry data-dog set
283
-
--enable-open-telemetry-traces true
284
-
--enable-open-telemetry-metrics true
285
-
286
-
az containerapp env telemetry otlp update
287
-
--enable-open-telemetry-traces true
288
-
--enable-open-telemetry-logs true
289
-
--enable-open-telemetry-metrics true
288
+
```
290
289
291
290
---
292
291
293
292
## Send data from your app to an OTel agent
294
293
295
-
For data to be sent to the agent, install the OSS OTEL SDK (link) to your code. The otel agent auto injects environment variables during app runtime to pick up any logs, metrics, or traces produced using the SDK. See example for details.
294
+
To send data to an agent, install the [OTel SDK](https://opentelemetry.io/ecosystem/integrations/) into your application. The OTel agent automatically injects environment variables when your application runs to pick up logs, metrics, or traces produced while using the SDK.
296
295
297
296
## OTel agent costs
298
297
@@ -306,7 +305,7 @@ For example, if you send data to both Azure App Insights and Datadog, you're res
306
305
307
306
### How can I use an OTLP agent with a Dapr Sidecar?
308
307
309
-
You can configure Dapr to send traces to App Insights without a agent, but you can choose to use an OTel agent as an alternative.
308
+
You can configure Dapr to send traces to App Insights without an agent, but you can choose to use an OTel agent as an alternative.
310
309
311
310
By default an OTel agent doesn't include system data, but you can include system level messages (including Dapr telemetry) by setting `includeSystemTelemetry` to `true`.
0 commit comments