# Agent Java and hole in timing

**URL:** <https://discuss.elastic.co/t/agent-java-and-hole-in-timing/226580>\
**Category:** APM\
**Tags:** java\
**Created:** [April 5, 2020, 5:37pm UTC](https://discuss.elastic.co/t/agent-java-and-hole-in-timing/226580 "2020-04-05T17:37:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniele\_Renda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniele_renda/32/39939_2.png) [@Daniele\_Renda](https://discuss.elastic.co/u/Daniele_Renda)\
**Post date:** [April 5, 2020, 5:37pm UTC](https://discuss.elastic.co/t/agent-java-and-hole-in-timing/226580/1 "2020-04-05T17:37:56Z")

</div>

I've a Spring Boot REST application. I installed and configured the Java monitor to track performance of my application.  
I read documentation and I set values suitable for my case. I'm still in dev environment to do some tests.

 ![Schermata 2020-04-05 alle 19.26.33](https://us1.discourse-cdn.com/elastic/original/3X/5/3/53d52719b4134754b8c9080bd539a9decc315cae.png)  
As you see in this image, in this REST call, the total time is not the sum of all items shown in the list.  
There are "white holes" betweens blue boxes. How can I understand what's that time?

Do you have any suggestion to investigate more? I tried to annotate my method with @Traced but it didn't do anything more.

Thanks

**Kibana version** : 7.6.2

**Elasticsearch version** : 7.6.2

**APM Server version** : 7.6.2

**APM Agent language and version** : Java

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [April 6, 2020, 8:15am UTC](https://discuss.elastic.co/t/agent-java-and-hole-in-timing/226580/2 "2020-04-06T08:15:38Z")

</div>

Hi @Daniele_Renda,

Today might be your lucky day, because we recently added a feature in Java agent that just does what you need :-).

Using a sampling profiler that has very low overhead, we can infer which spans are being executed, without the need for any instrumentation.

Everything is explained in details in [this blogpost](https://www.elastic.co/blog/from-distributed-tracing-to-distributed-profiling-with-elastic-apm), thus all you need is updating to the latest version of the agent.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 27, 2020, 4:15am UTC](https://discuss.elastic.co/t/agent-java-and-hole-in-timing/226580/3 "2020-04-27T04:15:41Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
