# How to monitor Azure Container Apps with Dynatrace?

**URL:** <https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274>\
**Category:** Open Q&A\
**Tags:** azure\
**Created:** [April 12, 2023, 6:55pm UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274 "2023-04-12T18:55:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawnz88](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@shawnz88](https://community.dynatrace.com/u/shawnz88)\
**Post date:** [April 12, 2023, 6:55pm UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/1 "2023-04-12T18:55:21Z")

</div>

[Azure Container Apps](https://azure.microsoft.com/en-us/products/container-apps) is a relatively new fully managed serverless container service in Azure.

How can it be monitored with Dynatrace?

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [April 13, 2023, 8:57am UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/2 "2023-04-13T08:57:20Z")

</div>

Hi&nbsp;[@shawnz88](https://community.dynatrace.com/user/41149)

Azure Container Apps is part of Container Services.  
To monitor basic metrics, you can use, for example,&nbsp;[Monitor Azure Container Instances — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/azure-container-instances)

It’s worth verifying that you can install OA on the container as you can with AKS 🙂

Regards,

Radek

---

<div class="post-metadata">

**Author:** ![benjamin\_mullan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/benjamin_mullan/32/38132_2.png) [@benjamin\_mullan](https://community.dynatrace.com/u/benjamin_mullan)\
**Post date:** [April 18, 2023, 12:03am UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/3 "2023-04-18T00:03:06Z")

</div>

[@shawnz88](https://community.dynatrace.com/user/41149)&nbsp;I have been keeping my eye on this topic for a while.

You can bake the oneagent into your dockerBuild file to get service level insights and the rest of the OA feature set

> **[Set up OneAgent on containers for application-only monitoring](https://docs.dynatrace.com/docs/ingest-from/setup-on-container-platforms/docker/set-up-oneagent-on-containers-for-application-only-monitoring)**
>
> Install, update, and uninstall OneAgent on containers for application-only monitoring.

As for monitoring the ACA infrastructure/runtime this has been asked of from both Microsoft and Dynatrace. Currently the Azure set of Dynatrace, last I checked, didn’t have the option to pull in the MS telemetry for the underlying ACA-Env/containers. I am also not sure how it will deal with logging as the default is to ship them to a Log analytics workspace.

---

<div class="post-metadata">

**Author:** ![dylan\_taelemans](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dylan_taelemans/32/21501_2.png) [@dylan\_taelemans](https://community.dynatrace.com/u/dylan_taelemans)\
**Post date:** [April 18, 2023, 12:25pm UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/4 "2023-04-18T12:25:31Z")

</div>

You can monitor it by installing the OA inside of the container (dockerfile), but there are some limitations / challenges.

- You can’t&nbsp;Customize OneAgent installation (ex host groups, custom properties, custom hostnames, etc)
- agent tools (ex oneagentctl) are not included in the installation =\> you won’t be able to use them.
- Making customisation in the Dynatrace UI after deployment is only a temporary solution =\> containers are immutable so everytime you make a change it will create a completely new container and this container will be detected as a new host in dynatrace.
- Only global dynatrace settings will apply to your container hosts =\> all other changes you will lose when the container is killed and a new one created, because it is a completely new host.
- Because Dynatrace creates a new host for each individual container, it becomes more difficult to keep track of everything neatly. Containers are relatively short living especially if you have automatic up-downscaling.

Monaco could be a possible solution to keep your config, but I still need to test this.  
An other possible solution is executing a custom script in you pipeline after container deployment to set settings (using dynatrace API) .

---

<div class="post-metadata">

**Author:** ![shibily](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@shibily](https://community.dynatrace.com/u/shibily)\
**Post date:** [March 5, 2024, 11:47am UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/5 "2024-03-05T11:47:28Z")

</div>

[@dylan\_taelemans](https://community.dynatrace.com/user/19639)Do we have a solution to have a consistent host name whenever the container restarts? I am seeing multiple hosts added in the Dynatrace hosts section whenever the container restarts.

---

<div class="post-metadata">

**Author:** ![benjamin\_mullan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/benjamin_mullan/32/38132_2.png) [@benjamin\_mullan](https://community.dynatrace.com/u/benjamin_mullan)\
**Post date:** [March 6, 2024, 4:39am UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/6 "2024-03-06T04:39:04Z")

</div>

[@shibily](https://community.dynatrace.com/user/72980)&nbsp;I think it depends on what you intend to do. The host names will be different due to revision/replica combinations.

I have tested using and environment variable applied to the container:

DT\_CUSTOM\_PROP=Application=applicationnamehere

Then creating a automatically applied tag using this&nbsp;

 ![benjamin_mullan_0-1709699592342.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/7ce4d0598be5be6847de00ea30e9ae533be66917.png)

Then you can use a host name rule to remove the bits at the end. like below but you will require one rule per application name if there are many. The gui doesnt allow regex but the api might?

 ![benjamin_mullan_1-1709699659052.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/1/a109814859c4f54298951fae60e013a5a18e5b91.png)

I haven’t had much time to play with how this will look in the data explorer. i.e are all the host measured on one line with no instance(revision/replica) splitting?

Again I think it depends on what you are trying to do. I think each revision and replica SHOULD be a separate host but we also need a way to measure deviations across revisions and replica for threshold alerting and dashboarding.

I’m just going to leave the tag on for my ones and not bother with renaming the individual hosts/services as i want to know exactly which node is playing up.

I would be nice if the detected metadata could be expanded to behave like a process group/container group.

---

<div class="post-metadata">

**Author:** ![dylan\_taelemans](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dylan_taelemans/32/21501_2.png) [@dylan\_taelemans](https://community.dynatrace.com/u/dylan_taelemans)\
**Post date:** [March 6, 2024, 5:47am UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/7 "2024-03-06T05:47:16Z")

</div>

[@shibily](https://community.dynatrace.com/user/72980), a container is&nbsp;immutable so&nbsp;restart will generate an entirely new ‘host/container’. Therefore, Dynatrace will also recognize this as a new host. For host naming, we’ve established a Global rule using the AzureHostName property, which incorporates the slot name {Host:AzureHostName/^([^.]++)}. Additionally, we used condition Paas Type equals ‘Azure Websites.’ You can experiment with adding IP, but keep in mind that it will result in longer names.

For dashboarding purposes, we can harness the creative capabilities of Grail to generate visually appealing graphs with minimal interruptions and color changes when splitting on hosts. However, they can still be a bit challenging from time to time. 😄

---

<div class="post-metadata">

**Author:** ![shohebakthar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@shohebakthar](https://community.dynatrace.com/u/shohebakthar)\
**Post date:** [June 24, 2025, 3:43pm UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/8 "2025-06-24T15:43:39Z")

</div>

Are above still the best option to&nbsp;Azure Container Apps with Dynatrace?

---

<div class="post-metadata">

**Author:** ![dylan\_taelemans](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dylan_taelemans/32/21501_2.png) [@dylan\_taelemans](https://community.dynatrace.com/u/dylan_taelemans)\
**Post date:** [June 24, 2025, 6:26pm UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/9 "2025-06-24T18:26:13Z")

</div>

Yes,  
As far as I know you still have the same two options:

- **Monitor limited basic metrics** via the Azure integration:  
[Monitor Azure Container Instances — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/azure-container-instances)

**OR**

- **Bake the Dynatrace OneAgent into your Dockerfile** :  
[Set up OneAgent on containers for application-only monitoring — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-container-platforms/docker/set-up-oneagent-on-containers-for-application-only-monitoring)

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [June 25, 2025, 7:32am UTC](https://community.dynatrace.com/t/how-to-monitor-azure-container-apps-with-dynatrace/39274/10 "2025-06-25T07:32:47Z")

</div>

Yes, it’s the best option at the moment.
