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

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

Help us!!!!!!

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 ?

Hi @Sylvain_Juge!

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

Thanks for supporting!

Hi @Sylvain_Juge,

I am trying to configure apm agent in my 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 .

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.

Hi @Jyothi_Singh,

You can find an example on how to inject logger for Elastic APM Agent to use in AspNetFullFrameworkSampleApp sample application.

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.

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)

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 . I added them and things started to work.

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