# Some transaction samples have spans, some not

**URL:** <https://discuss.elastic.co/t/some-transaction-samples-have-spans-some-not/160915>\
**Category:** APM\
**Created:** [December 14, 2018, 2:14pm UTC](https://discuss.elastic.co/t/some-transaction-samples-have-spans-some-not/160915 "2018-12-14T14:14:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fr0der1c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fr0der1c/32/34125_2.png) [@fr0der1c](https://discuss.elastic.co/u/fr0der1c)\
**Post date:** [December 14, 2018, 2:14pm UTC](https://discuss.elastic.co/t/some-transaction-samples-have-spans-some-not/160915/1 "2018-12-14T14:14:23Z")

</div>

I'm using elastic-apm 4.0.2 for Python and ELK stack 6.5.1. I notice in the Transaction sample, some samples have spans, while some do not have. Is this by design?

 ![WX20181214-221134%402x](https://us1.discourse-cdn.com/elastic/original/3X/a/f/af7fa479168c53ea88106ea7dfda6b6c8f8a79db.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f2df7c41370c92375da111047c96192e0fe7a28.png)

---

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 16, 2018, 10:15am UTC](https://discuss.elastic.co/t/some-transaction-samples-have-spans-some-not/160915/2 "2018-12-16T10:15:18Z")

</div>

Originally, does your all transaction have spans?  
For me, some of transactions don't have spans because cache. (There is no db query actually.)

---

<div class="post-metadata">

**Author:** ![fr0der1c](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fr0der1c/32/34125_2.png) [@fr0der1c](https://discuss.elastic.co/u/fr0der1c)\
**Post date:** [December 16, 2018, 12:26pm UTC](https://discuss.elastic.co/t/some-transaction-samples-have-spans-some-not/160915/3 "2018-12-16T12:26:47Z")

</div>

> [@toughrogrammer](#):
>
> Originally, does your all transaction have spans?

Yes. I use `elasticapm.capture_span()` to manually measure span. And we do not have such cache currently.

---

<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:** [January 6, 2019, 8:26am UTC](https://discuss.elastic.co/t/some-transaction-samples-have-spans-some-not/160915/4 "2019-01-06T08:26:52Z")

</div>

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