# Does Custom spans takes latency?

**URL:** <https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988>\
**Category:** APM\
**Tags:** elastic-stack-monitoring\
**Created:** [January 9, 2025, 11:09am UTC](https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988 "2025-01-09T11:09:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amol\_Nagotkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amol_nagotkar/32/124188_2.png) [@Amol\_Nagotkar](https://discuss.elastic.co/u/Amol_Nagotkar)\
**Post date:** [January 9, 2025, 11:09am UTC](https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988/1 "2025-01-09T11:09:24Z")

</div>

Hi all,

i am using elk version **7.17.1**. i have to add custom span for redis, rabbitmq and mongodb in code(express nodejs application).

1. does enterprise edition provide this feature automatically?
2. how much latency it takes if i don't take enterprise edition and add custom span in my code for redis, rabbitmq and mongodb.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [January 9, 2025, 11:51am UTC](https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988/2 "2025-01-09T11:51:51Z")

</div>

Hi @Amol_Nagotkar,

Can you confirm how you are capturing the custom spans? Are you using OTel or the Elastic Node.js APM agent?

---

<div class="post-metadata">

**Author:** ![Amol\_Nagotkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amol_nagotkar/32/124188_2.png) [@Amol\_Nagotkar](https://discuss.elastic.co/u/Amol_Nagotkar)\
**Post date:** [January 9, 2025, 11:56am UTC](https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988/3 "2025-01-09T11:56:20Z")

</div>

Hi ma'am

thank you for the quick reply.  
i am using Elastic Node.js APM agent currently.

in cases OTel also i have to add custom span in my express nodejs application ??

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [January 13, 2025, 12:44pm UTC](https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988/4 "2025-01-13T12:44:43Z")

</div>

Hi @Amol_Nagotkar,

Thanks for the detail. For redis, rabbitmq and mongodb are you using the respective JS-packages to connect with your DB? Or another mechanism. I do see Redis and MongoDB client support listed in the compatible technologies for the agent, subject to version compatibility:

> **[Supported technologies | APM Node.js Agent Reference \[4.x\] | Elastic](https://www.elastic.co/guide/en/apm/agent/nodejs/current/supported-technologies.html#compatibility-tracing-and-instrumentation)**

For Redis and MongoDB provided you are using compatible versions of the referenced libraries queries will be captured. I don't see anything listed for Rabbit-MQ. These capabilities should be available on the free tier.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Amol\_Nagotkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amol_nagotkar/32/124188_2.png) [@Amol\_Nagotkar](https://discuss.elastic.co/u/Amol_Nagotkar)\
**Post date:** [January 20, 2025, 8:33am UTC](https://discuss.elastic.co/t/does-custom-spans-takes-latency/372988/5 "2025-01-20T08:33:51Z")

</div>

Thanks for the reply.  
My mongo, redis versions are compatible with the doc mentioned above, still it doesnt capture span automatically. i have to add it manually.
