# auto-instrumentation - Overhead

**URL:** <https://community.dynatrace.com/t/auto-instrumentation-overhead/34104>\
**Category:** Real User Monitoring\
**Tags:** installation, updates, mobile-monitoring\
**Created:** [February 10, 2022, 5:38pm UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104 "2022-02-10T17:38:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://community.dynatrace.com/u/Sara)\
**Post date:** [February 10, 2022, 5:38pm UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/1 "2022-02-10T17:38:48Z")

</div>

Hi,&nbsp;I want to perform automatic instrumentation for Android (Dynatrace Android Gradle plugin) and iOS and I want to know how much the weight of the mobile application will increase and how much data consumption (internet) will be after performing the instrumentation.&nbsp;I was asking and they gave me an answer&nbsp;[Android manual setup and instrumentation | AppMon documentation (dynatrace.com)](https://www.dynatrace.com/support/doc/appmon/user-experience-management/mobile-uem/how-to-instrument-an-android-app/android-agent-7x/android-agent-setup-and-instrumentation/#anchor_limit)&nbsp;and&nbsp;[Mobile UEM | AppMon documentation (dynatrace.com)](https://www.dynatrace.com/support/doc/appmon/user-experience-management/mobile-uem/#anchor_overhead).&nbsp;The drawback is that this information is from AppMon and is not very recent, ¿Is there another document that I can review or a more recent version that has this information?

Thanks

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [February 11, 2022, 7:29am UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/2 "2022-02-11T07:29:28Z")

</div>

CPU overhead is so low I can’t really be measured. The application binary size will increase slightly (not sure about the current size but it was ~500kB last time I tried to compare it). And regarding the data consumption - it’s best to measure it by yourself if you are worried. The payloads are effective, compressed and sent out in batches from the instrumented application.

---

<div class="post-metadata">

**Author:** ![ljavelac](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@ljavelac](https://community.dynatrace.com/u/ljavelac)\
**Post date:** [February 17, 2022, 12:07am UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/3 "2022-02-17T00:07:54Z")

</div>

Hello Julius

¿Do you know a tool to measure data consumption ?&nbsp; and ¿How can it be identified the dynatrace batches?

Thanks

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [February 18, 2022, 7:12am UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/4 "2022-02-18T07:12:39Z")

</div>

[@ljavelac](https://community.dynatrace.com/user/38588)&nbsp;you will need to measure it by yourself somehow. The beacon URL contains /dtmb or /mbeacon depending on the configuration of your application and the SDK version used.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [February 18, 2022, 9:16am UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/5 "2022-02-18T09:16:06Z")

</div>

[@ljavelac](https://community.dynatrace.com/user/38588)

If you don’t have root/jailbreaked device, the most correct way to acknowledge the Dynatrace traffic is to capture it on the network side. I know this is not easy, but it is the most correct way. This is because you will then have to filter out Dynatrace traffic, as in a typical situation, phones are very network chatty, your app will probably be using it’s own data, and also you might have other 3rd parties like Firebase.

I have done this before, and it’s only a few KBs per user action, but it can vary, depending on multiple factors, including of course the ones [@Julius\_Loman](https://community.dynatrace.com/user/3364) mentioned.

---

<div class="post-metadata">

**Author:** ![ljavelac](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@ljavelac](https://community.dynatrace.com/u/ljavelac)\
**Post date:** [March 23, 2022, 10:30pm UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/6 "2022-03-23T22:30:30Z")

</div>

I performed some tests to measure the data consumption of the mobile RUM in a native android application instrumented via Dynatrace Android Gradle plugin.

So I just want to post my experience and results.

I used theese tools and I got a good experience, but you should use them under your responsability:

- Tpacketcapture, this app is available in play store, and this is a vpn app that capture the network traffic of the smartphone and save it in a .pcap file.
- WireShark for PC to analyze the .pcap file.

I performed 3 tests, 2 using wifi and 1 using mobile data. Then I checked the user sessions in Dynatrace Saas to determine the number of user action, errors, crash, events and session properties reported.

Then I analyzed each .pcap file, here it was a little difficult to identify the Dynatrace IPs so I tried with resolving the domain by running a nslookup command to the mobile beacon of the tenant, finally I got 5 distinct IPs.

Then I filtered the IPs and verified the payloads to be sure about the Dynatrace traffic nodes. Here I found some references to amazon and the mbeacon.

Here a result table:

 ![ljavelac_2-1648074276331.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/ffb5f38a93fd5afe4c91946e5f1196562c318c11.png)

I realized that there were incoming an outcoming traffic in the app for the Dynatrace communication.

App incoming traffic from dynatrace = mostly security validations, TLS certificates (aws, dynatrace)…

App outcoming traffic to dynatrace= mostly mobile rum reported data.

Finally

**Data consumption for a user session with no crashes is around:**

**test 2**

outcoming = 16.91 KB rounded to 17 KB  
incoming = 47.91 KB rounded to 48 KB  
Total = 64.82 KB rounded to 65 KB

User actions = 33

**test 3**

outcoming = 18.7 KB rounded to 19 KB  
incoming = 48.1 KB rounded to 48 KB  
Total = 66.8 KB rounded to 67 KB

User actions = 38

So, if I take the outcoming KB and divide by the number of user actions I get around 0,5 KB per user action.

**Data consumption for a user session with crash is around:**

**test 1**

outcoming = 24,7 KB rounded to 25 KB  
incoming = 73,6 KB rounded to 74 KB  
Total = 98.3 KB rounded to 98 KB

User actions = 16

The Data consumption increased, I think it could be because of the crash stacktrace reported.

So, if I take the outcoming KB and divide by the number of user actions I get around 1,5 KB per user action.

For ending this post, I tried to raise a equation using useraction as variable and depending if the user action have crash or doesn´t. But this is very very experimental an is based only in 3 tests so there aren’t enought data points.

 ![ljavelac_3-1648074382211.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/a/ea370630971c8cc3ff3dfcf416eee306d7c25767.png)

The customer was concerned about data consumption, so this challenge was interesting and we got information that helped the customer to trust more in Dynatrace.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [March 23, 2022, 10:41pm UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/7 "2022-03-23T22:41:11Z")

</div>

[@ljavelac](https://community.dynatrace.com/user/38588)

Thanks so much for you investigation! I suppose that the traffic you mention is only the Dynatrace traffic, as 500 bytes per user action is even lower that what I had imagined!

---

<div class="post-metadata">

**Author:** ![ljavelac](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@ljavelac](https://community.dynatrace.com/u/ljavelac)\
**Post date:** [March 23, 2022, 10:47pm UTC](https://community.dynatrace.com/t/auto-instrumentation-overhead/34104/8 "2022-03-23T22:47:14Z")

</div>

You’re right, the traffic mention is only the Dynatrace traffic.
