# .net Core Span APM

**URL:** <https://discuss.elastic.co/t/net-core-span-apm/208104>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [November 15, 2019, 4:28pm UTC](https://discuss.elastic.co/t/net-core-span-apm/208104 "2019-11-15T16:28:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirtash](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kirtash](https://discuss.elastic.co/u/Kirtash)\
**Post date:** [November 15, 2019, 4:28pm UTC](https://discuss.elastic.co/t/net-core-span-apm/208104/1 "2019-11-15T16:28:32Z")

</div>

Hi!!!

I have installed and configure the APM in my differents services and it works perfectly, but i would like get the span of the database calls. Now I only have the call of the endpoint but how can I get this information? Do I need add something in the sql call to register it into APM?

Thanks for all!

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [November 15, 2019, 5:06pm UTC](https://discuss.elastic.co/t/net-core-span-apm/208104/2 "2019-11-15T17:06:05Z")

</div>

Hi @Kirtash,

What database library do you use? We currently support Entity Framework and Entity Framework Core.

If this is an [ASP.NET](http://ASP.NET) Core app and you used the `app.UseAllElasticApm` method from the `Elastic.Apm.NetCoreAll` namespace as described [here](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup.html) then database monitoring should be turned on by default for Entity Framework Core.

---

<div class="post-metadata">

**Author:** ![Kirtash](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kirtash](https://discuss.elastic.co/u/Kirtash)\
**Post date:** [November 19, 2019, 11:57am UTC](https://discuss.elastic.co/t/net-core-span-apm/208104/3 "2019-11-19T11:57:07Z")

</div>

Thanks Greg!!

I don't use the Entity Framework, I make the queries directly with a connectionString.

i understand that is not possible make these traces with one command against APM.

Att

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [November 19, 2019, 12:21pm UTC](https://discuss.elastic.co/t/net-core-span-apm/208104/4 "2019-11-19T12:21:09Z")

</div>

I see, so you use the `SqlComand` and similar types, right?

We just had [a community PR](https://github.com/elastic/apm-agent-dotnet/pull/592) to add support for that 🙂 It's not yet merged, and there are some questions and challenges to solve, but maybe it's worth following that - hopefully we'll have support for your scenario soon. We definitely work on it!

---

<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:** [December 10, 2019, 8:21am UTC](https://discuss.elastic.co/t/net-core-span-apm/208104/5 "2019-12-10T08:21:14Z")

</div>

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