@@ -180,6 +180,29 @@ az containerapp env telemetry data-dog set \
180
180
# [ Terraform] ( #tab/terraform )
181
181
182
182
``` hcl
183
+ resource "azapi_update_resource" "app_insights_open_telemetry_integration" {
184
+ name = azurerm_container_app_environment.managed_environment.name
185
+ parent_id = azurerm_resource_group.resource_group.id
186
+ type = "Microsoft.App/managedEnvironments@2023-11-02-preview"
187
+ body = jsonencode({
188
+ properties = {
189
+ openTelemetryConfiguration = {
190
+ destinationsConfiguration = {
191
+ dataDogConfiguration = {
192
+ site = "<YOUR_DATADOG_SUBDOMAIN>.datadoghq.com"
193
+ key = "<YOUR_DATADOG_KEY>"
194
+ }
195
+ }
196
+ tracesConfiguration = {
197
+ destinations = ["dataDog"]
198
+ }
199
+ metricsConfiguration = {
200
+ destinations = ["dataDog"]
201
+ }
202
+ }
203
+ }
204
+ })
205
+ }
183
206
```
184
207
185
208
---
@@ -253,6 +276,48 @@ az containerapp env telemetry otlp add \
253
276
# [ Terraform] ( #tab/terraform )
254
277
255
278
``` hcl
279
+ resource "azapi_update_resource" "app_insights_open_telemetry_integration" {
280
+ name = azurerm_container_app_environment.managed_environment.name
281
+ parent_id = azurerm_resource_group.resource_group.id
282
+ type = "Microsoft.App/managedEnvironments@2023-11-02-preview"
283
+ body = jsonencode({
284
+ properties = {
285
+ openTelemetryConfiguration = {
286
+ destinationsConfiguration = {
287
+ otlpConfigurations = [
288
+ {
289
+ name = "otlp1"
290
+ endpoint = "ENDPOINT_URL_1"
291
+ insecure = false
292
+ headers = "api-key-1=key"
293
+ },
294
+ {
295
+ name = "otlp2"
296
+ endpoint = "ENDPOINT_URL_2"
297
+ insecure = true
298
+ }
299
+ ]
300
+ }
301
+ logsConfiguration = {
302
+ destinations = [
303
+ "otlp2"
304
+ ]
305
+ },
306
+ tracesConfiguration = {
307
+ destinations = [
308
+ "otlp1",
309
+ "otlp2"
310
+ ]
311
+ },
312
+ metricsConfiguration = {
313
+ destinations = [
314
+ "otlp1"
315
+ ]
316
+ }
317
+ }
318
+ }
319
+ })
320
+ }
256
321
```
257
322
258
323
---
0 commit comments