# What causes gaps in span

**URL:** <https://discuss.elastic.co/t/what-causes-gaps-in-span/216680>\
**Category:** APM\
**Tags:** java\
**Created:** [January 27, 2020, 3:07pm UTC](https://discuss.elastic.co/t/what-causes-gaps-in-span/216680 "2020-01-27T15:07:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethranes](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@ethranes](https://discuss.elastic.co/u/ethranes)\
**Post date:** [January 27, 2020, 3:07pm UTC](https://discuss.elastic.co/t/what-causes-gaps-in-span/216680/1 "2020-01-27T15:07:46Z")

</div>

**Kibana version** : 6.7.1

**Elasticsearch version** : 6.7.1

**APM Agent language and version** : Java

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

 ![tempsnip](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1ba447fe0a0f96e1f31057732a8cceb86ca4ae4c.png)

Using the APM I see that there are gaps in the span timelines. I'm wondering, is the cause of this because I haven't got a trace method setup for the class that the transaction is calling through to? Or is it an issue with my sample rate (not set to 100). Just seeing if there's any info here on the most likely issue so that I can look into it.

P.S. It's also very possible that this timeline graph doesn't do what I expect it to do.

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [January 27, 2020, 3:41pm UTC](https://discuss.elastic.co/t/what-causes-gaps-in-span/216680/2 "2020-01-27T15:41:50Z")

</div>

It's as you assumed- most of the transaction handling time is spent on non-traced code. See [here](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-java-methods) a list of options of manually getting your code traced.  
In addition, we are already working on [automatically inferring spans](https://github.com/elastic/apm-agent-java/pull/983), which may be fill such gaps nicely. It is still WIP, but I suggest you follow this PR and check it out.

---

<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:** [February 17, 2020, 11:41am UTC](https://discuss.elastic.co/t/what-causes-gaps-in-span/216680/3 "2020-02-17T11:41:51Z")

</div>

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