ASP dotnet manual log correlation not working

TIP 1: select at least one tag that further categorizes your topic. For example server for APM Server related questions, java for questions regarding the Elastic APM Java agent, or ui for questions about the APM App within Kibana.

TIP 2: Check out the troubleshooting guide first. Not only will it help you to resolve common problems faster but it also explains in more detail which information we need before we can properly help you.

Kibana version: 8.4.3.

Elasticsearch version: 8.4.3

APM Server version: 8.4.3

APM Agent language and version: 1.x

Browser version: EDGE

Original install method (e.g. download page, yum, deb, from source, etc.) and version: download page

Fresh install or upgraded from other version? Fresh

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
No we are not using losgatsh, kafka and also no APM load balanacer, we are using all default

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
WE have ASP dotnet based web setup, working as ecommerce website, we have already enabled the elastic APM securely on it and it is working as expected
Now we are trying to enable manual log correlation on our application by following link "Manual log correlation | APM .NET Agent Reference [1.x] | Elastic"

Added below lines in program.cs file (Unstructured method)

var currentTransaction = Elastic.Apm.Agent.Tracer.CurrentTransaction;

Console.WriteLine($"ERROR [{currentTransaction.TraceId}{currentTransaction.Id}] an error occurred");

And restarted my application with no error

I have also enabled the ingest pipeline as mentioned in document, and added the pipeline in filebeat output.

I am not sure how i can check if it is working or not
From which log file i can check if & is generated
And which log source file i need to add in filebeat input so that configured pipeline will be useful and i can see the data in kibana

Steps to reproduce:

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):
Configuration details

Your reply and help will be helpful

Hi @pratikshatiwari,

are you using a logging framework like NLog or Serilog?

Hello @Wolfgang_Ziegler

no not using selilog or Nlog i followed the procedure of manual log correlation, do i need to look for serilog to achieve this?


Hi @pratikshatiwari,

no, it's not required to have a logging framework, I just wanted to get more context.

As explained in the documentation that you also linked, you can do manual log correlation.
In that case, you need to make sure that your log messages are written to a file that is then processed by filebeat.

Hello @Wolfgang_Ziegler

I Agreess but To write the logs in log file i could not find the right document, checking if i can add any parameter in my manual correlation by defining the log path, and log type (debug, info, warn, error)

so that after running application i can go and see the log information from denied path



sorry, I'm not sure what you mean by "right document" and "denied path".
Does your application write a custom log file at the moment?

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