# How to configure APM of elastic search in ASP.NET Framework?

**URL:** <https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [January 22, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086 "2020-01-22T15:17:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![joao\_vitor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joao_vitor/32/60291_2.png) [@joao\_vitor](https://discuss.elastic.co/u/joao_vitor)\
**Post date:** [January 22, 2020, 3:17pm UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/1 "2020-01-22T15:17:14Z")

</div>

i need a config of apm in .net framework.  
I'm trying different approaches, but without success..

Help us!!!!!!

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [January 22, 2020, 5:06pm UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/2 "2020-01-22T17:06:52Z")

</div>

Hi @joao_vitor,

Could you please elaborate a bit on what you have tried and did not worked so far ?

- did you managed to install the agent on your application ?
- if yes, does the agent has error message in its logs ?
- do you see anything on kibana side ?

Also, providing a bit more context on your application is usually very useful:

- what version of .net framework is your application using ?
- are there any special frameworks/libraries being used ?

---

<div class="post-metadata">

**Author:** ![joao\_vitor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joao_vitor/32/60291_2.png) [@joao\_vitor](https://discuss.elastic.co/u/joao_vitor)\
**Post date:** [January 27, 2020, 1:24pm UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/3 "2020-01-27T13:24:09Z")

</div>

Hi @Sylvain_Juge!

I'm trying in .net framework 4.7.2, but now it's working!

Thanks for supporting!

---

<div class="post-metadata">

**Author:** ![Jyothi\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jyothi_singh/32/61521_2.png) [@Jyothi\_Singh](https://discuss.elastic.co/u/Jyothi_Singh)\
**Post date:** [January 28, 2020, 9:27am UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/4 "2020-01-28T09:27:02Z")

</div>

Hi @Sylvain_Juge,

I am trying to configure apm agent in my [asp.net](http://asp.net) framework application which was targeted to 4.5.1 but I later changed t to 4.6.1 to support the apm agent. I was successfully able to add the references of the apm agent packages and also added ElasticApmModule to configure it with IIS modules. I am new to the entire network of .net and all its frameworks. I did all the configuration following the document here -\> [https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup.html#setup-asp-net](https://www.elastic.co/guide/en/apm/agent/dotnet/current/setup.html#setup-asp-net) .

I dont see anything on the Kibana UI under APM section. I was hoping to find out if there is any way that I could see the logs of the apm agent which would help me find out whether or not is it is able to establish connection with APM.

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [January 30, 2020, 8:47am UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/5 "2020-01-30T08:47:33Z")

</div>

Hi @Jyothi_Singh,

You can find an example on how to inject logger for Elastic APM Agent to use [in AspNetFullFrameworkSampleApp sample application](https://github.com/elastic/apm-agent-dotnet/blob/master/sample/AspNetFullFrameworkSampleApp/App_Start/LoggingConfig.cs#L56).

---

<div class="post-metadata">

**Author:** ![Jyothi\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jyothi_singh/32/61521_2.png) [@Jyothi\_Singh](https://discuss.elastic.co/u/Jyothi_Singh)\
**Post date:** [January 31, 2020, 12:46pm UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/6 "2020-01-31T12:46:14Z")

</div>

Hi @Sergey_Kleyman

Thank you so much for the information. I am currently using Serilog as a logging framework in my project and added it as agent dependency to fetch logs. I was able to get some logs about the agent, but it did not turned out to be descriptive enough to debug the issue with the agent. I am adding the logs below.

> **Logs**
>
> 2020-01-31 05:55:03.536 -05:00 [Debug] {AbstractConfigurationReader (FullFrameworkConfigReader)} Service name provided in configuration is hantweb  
> 2020-01-31 05:55:03.536 -05:00 [Information] {AbstractConfigurationReader (FullFrameworkConfigReader)} The agent was started without a service version. The service version will be automatically discovered.  
> 2020-01-31 05:55:03.536 -05:00 [Warning] {AbstractConfigurationReader (FullFrameworkConfigReader)} Failed to discover service version, the service version will be omitted.  
> 2020-01-31 05:55:03.551 -05:00 [Debug] {AbstractConfigurationReader (FullFrameworkConfigReader)} Service name provided in configuration is hantweb  
> 2020-01-31 05:55:03.551 -05:00 [Information] {AbstractConfigurationReader (FullFrameworkConfigReader)} The agent was started without a service version. The service version will be automatically discovered.  
> 2020-01-31 05:55:03.551 -05:00 [Warning] {AbstractConfigurationReader (FullFrameworkConfigReader)} Failed to discover service version, the service version will be omitted.  
> 2020-01-31 05:55:32.457 -05:00 [Information] Inside LoggingConfig setup  
> 2020-01-31 05:55:32.520 -05:00 [Debug] {AbstractConfigurationReader (FullFrameworkConfigReader)} Service name provided in configuration is hantweb  
> 2020-01-31 05:55:32.520 -05:00 [Information] {AbstractConfigurationReader (FullFrameworkConfigReader)} The agent was started without a service version. The service version will be automatically discovered.  
> 2020-01-31 05:55:32.520 -05:00 [Warning] {AbstractConfigurationReader (FullFrameworkConfigReader)} Failed to discover service version, the service version will be omitted.  
> 2020-01-31 05:55:32.536 -05:00 [Debug] {AbstractConfigurationReader (FullFrameworkConfigReader)} Service name provided in configuration is hantweb  
> 2020-01-31 05:55:32.536 -05:00 [Information] {AbstractConfigurationReader (FullFrameworkConfigReader)} The agent was started without a service version. The service version will be automatically discovered.  
> 2020-01-31 05:55:32.536 -05:00 [Warning] {AbstractConfigurationReader (FullFrameworkConfigReader)} Failed to discover service version, the service version will be omitted.

Is this all the agent logs I will be able to fetch . Or is there a way to get more detailed logs mentioning about connection to ServerUrl or transactions? Because these logs do not show any error and I am still unable to see any data indexed in Kibana.

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [February 3, 2020, 3:13pm UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/7 "2020-02-03T15:13:17Z")

</div>

I would recommend setting `LogLevel` to `Trace` and letting the application run for at least 10 seconds to make sure Agent has a chance to send the data to APM Server (alternatively you can set [`FlushInterval` to `0`](https://www.elastic.co/guide/en/apm/agent/dotnet/current/config-reporter.html#config-flush-interval))

---

<div class="post-metadata">

**Author:** ![Jyothi\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jyothi_singh/32/61521_2.png) [@Jyothi\_Singh](https://discuss.elastic.co/u/Jyothi_Singh)\
**Post date:** [February 6, 2020, 9:17am UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/8 "2020-02-06T09:17:55Z")

</div>

Hi @Sergey_Kleyman

Thank you so much for all the help through out, I realized that my project was missing few package references present [here](https://github.com/elastic/apm-agent-dotnet/blob/master/src/Elastic.Apm/Elastic.Apm.csproj#L13-L20) . I added them and things started to work.

---

<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:** [March 5, 2020, 9:18am UTC](https://discuss.elastic.co/t/how-to-configure-apm-of-elastic-search-in-asp-net-framework/216086/9 "2020-03-05T09:18:01Z")

</div>

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