# Example Of Automatic Profiler Instrumentation APM

**URL:** <https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785>\
**Category:** APM\
**Tags:** dotnet, language-clients\
**Created:** [November 22, 2021, 8:32am UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785 "2021-11-22T08:32:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimmy\_Shu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimmy_shu/32/78224_2.png) [@Dimmy\_Shu](https://discuss.elastic.co/u/Dimmy_Shu)\
**Post date:** [November 22, 2021, 8:32am UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/1 "2021-11-22T08:32:42Z")

</div>

Good day everyone,

We use Elastic APM with dotnet agent for couple of months, it does a great job.

Recently we decided to adopt some third party framework which we cannot change the source code, so I came across to these solution  
[Profiler Auto instrumentation | APM .NET Agent Reference [1.12] | Elastic](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-auto-instrumentation.html)

After setting it up in my local, It show only CPU and memory metric in Kibana. At the moment I could not find any video/picture that show the expected output.

Should a trace appear or it only able to get the service metric ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8ab1e41d84ed503aec10e94581853f4a29d9f991.png)

---

<div class="post-metadata">

**Author:** ![gbamparop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gbamparop/32/95936_2.png) [@gbamparop](https://discuss.elastic.co/u/gbamparop)\
**Post date:** [November 22, 2021, 11:25am UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/2 "2021-11-22T11:25:22Z")

</div>

Thank you for your interest in Elastic APM.

The Metrics overview page which is shown in the screenshot provides agent-specific metrics, which lets you perform more in-depth root cause analysis investigations within the APM app. You can find more information about metrics in the [Kibana guide](https://www.elastic.co/guide/en/kibana/current/metrics.html#metrics).

Transactions for a particular service should normally be displayed in the Transactions tab.

---

<div class="post-metadata">

**Author:** ![Dimmy\_Shu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimmy_shu/32/78224_2.png) [@Dimmy\_Shu](https://discuss.elastic.co/u/Dimmy_Shu)\
**Post date:** [November 22, 2021, 12:58pm UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/3 "2021-11-22T12:58:06Z")

</div>

Hi Mate,

Thanks for your response, yeah all other service displayed in the transaction tab because we put apm agent inside the startup code.

Btw my point is, does the transaction still captured if use elastic automatic instrumentation approach(no code changes) instead of putting apm agent init inside the startup code (because we don't have access to the third party startup code) ?

There's no example output in the guide [Profiler Auto instrumentation | APM .NET Agent Reference [1.12] | Elastic](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-auto-instrumentation.html)

---

<div class="post-metadata">

**Author:** ![Dimmy\_Shu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimmy_shu/32/78224_2.png) [@Dimmy\_Shu](https://discuss.elastic.co/u/Dimmy_Shu)\
**Post date:** [November 22, 2021, 1:01pm UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/4 "2021-11-22T13:01:13Z")

</div>

Note In my example only metric captured

---

<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 23, 2021, 8:22pm UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/5 "2021-11-23T20:22:05Z")

</div>

Hi @Dimmy_Shu,

what kind of application do you use?

I think you may run into a limitation of the profiler - which is beta at this point.

I suspect you run an [ASP.NET](http://ASP.NET) Core app - is my guess correct? If so, then the issue can be that the profiler at this point does not turn on auto instrumentation for [ASP.NET](http://ASP.NET) Core. And that can be the reason why you don't see the transaction.

---

<div class="post-metadata">

**Author:** ![Dimmy\_Shu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimmy_shu/32/78224_2.png) [@Dimmy\_Shu](https://discuss.elastic.co/u/Dimmy_Shu)\
**Post date:** [November 24, 2021, 12:20am UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/6 "2021-11-24T00:20:31Z")

</div>

Hi @GregKalapos,

Yup, I'm using [Asp.net](http://Asp.net) core.

So i it is because beta stage?

After it is in stable state, will automatic instrumentation display the transaction?

---

<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 24, 2021, 11:33am UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/7 "2021-11-24T11:33:31Z")

</div>

> So i it is because beta stage?

Yes - or to be specific mainly because so far we did not really focus on this setup with the profiler.

Long term we definitely want to cover this with the profiler - yes.

Could you maybe elaborate on your use case? Because maybe this could be covered without the profiler as well.

Here is specifically what I'd like to understand:

1. Is this a whole application where you can't change the source code (and due to that you cant register the agent by adding the required C# code)?
2. Or is it about that you use some library which you don't have the source code for and you want visibility into that library (but overall for the app you still have source code, except 1 specific library)?

If it's option 1, then there is another way to register the agent without code change - that's not the profiler based option, but it works similar from the configuration's point of view, here are the details: [.NET Core | APM .NET Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup-dotnet-net-core.html#zero-code-change-setup) - this is tested with [ASP.NET](http://ASP.NET) Core.

---

<div class="post-metadata">

**Author:** ![Dimmy\_Shu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimmy_shu/32/78224_2.png) [@Dimmy\_Shu](https://discuss.elastic.co/u/Dimmy_Shu)\
**Post date:** [November 24, 2021, 3:45pm UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/8 "2021-11-24T15:45:19Z")

</div>

Hi Greg,

We are in scenario 1.  
We are using a ready made product and only able to build custom module around it.

So there is another approach, will try that out, thanks for your suggestion

---

<div class="post-metadata">

**Author:** ![Dimmy\_Shu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimmy_shu/32/78224_2.png) [@Dimmy\_Shu](https://discuss.elastic.co/u/Dimmy_Shu)\
**Post date:** [November 25, 2021, 1:37am UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/9 "2021-11-25T01:37:59Z")

</div>

@GregKalapos FYI it works, thanks 👍

I suggest to hide automatic profiler doc temporary if it's not completed yet 😀

---

<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 15, 2021, 9:38pm UTC](https://discuss.elastic.co/t/example-of-automatic-profiler-instrumentation-apm/289785/10 "2021-12-15T21:38:59Z")

</div>

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