# No db statement shown for mongodb?

**URL:** <https://discuss.elastic.co/t/no-db-statement-shown-for-mongodb/231482>\
**Category:** APM\
**Tags:** java\
**Created:** [May 7, 2020, 8:11am UTC](https://discuss.elastic.co/t/no-db-statement-shown-for-mongodb/231482 "2020-05-07T08:11:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk51211](https://avatars.discourse-cdn.com/v4/letter/e/ccd318/32.png) [@elk51211](https://discuss.elastic.co/u/elk51211)\
**Post date:** [May 7, 2020, 8:11am UTC](https://discuss.elastic.co/t/no-db-statement-shown-for-mongodb/231482/1 "2020-05-07T08:11:24Z")

</div>

I've followed a blogpost on setting up the apm app. There I could see the database queries of the traces with the sql statement

 ![grafik](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c65e82e6ac1096175d84b899cb758c129eebcb97.png)  
Then I tried it by myself with a spring application and a mongodb. It seems like there is no db.statement in the span.db.statement.

![2020-05-07 09_55_20-Window](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f5e7786ea9c03145b44cbf08a8dcc7d5b1cd7bec.png)

 ![2020-05-07 09_55_28-Window](https://us1.discourse-cdn.com/elastic/original/3X/e/f/ef494a71e15c2bc176cd1402168770733644feb3.png)

Why is that? Could not find any documentation about difference in db.

---

<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:** [May 7, 2020, 9:15am UTC](https://discuss.elastic.co/t/no-db-statement-shown-for-mongodb/231482/2 "2020-05-07T09:15:30Z")

</div>

Hi and thanks for the question.  
We don't collect the query for MongoDB spans - it is documented [here](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-databases).

---

<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:** [May 28, 2020, 5:15am UTC](https://discuss.elastic.co/t/no-db-statement-shown-for-mongodb/231482/3 "2020-05-28T05:15:33Z")

</div>

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