cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture log.error

Vikas_g1997
Dynatrace Guide
Dynatrace Guide

Hi Team,

We have a requirement from the customer to capture the log.error message (highlighted as 1 in the attached snapshot). Currently, we are only see the second exception captured to BizErrorCode.

Could someone guide us on how we can ensure the log.error exception is captured in Dynatrace? If there are specific configurations, such as logging integration or API usage, please let us know the steps to achieve this.

Looking forward to your suggestions.

Vikas_g1997_0-1735553550424.png

 

5 REPLIES 5

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

I can see too many exceptions are catched out-of-the-box, if you have OneAgent in fullstack. Have you check Exception analysis?

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Hi @AntonPineiro ,

The application is not onboarded  yet, but we want to confirm if it will be possible to capture the log.error message (highlighted as 1 in the attached snapshot) once onboarded.

We plan to test this scenario in the lower environment first.

RohitBisht
Dynatrace Advisor
Dynatrace Advisor

By default, the exception should be captured and you can find more when you configure the agent.
From the documentation:
https://docs.dynatrace.com/docs/shortlink/service-failure-detection

By default, Dynatrace detects:

  • Programming exceptions (Java, .NET, Node.js, and PHP) as the reason for failed requests when exceptions result in the abort of service calls.

If still not captured, you can define custom exception detection, using this.
https://docs.dynatrace.com/docs/shortlink/service-failure-detection#general

Screenshot from my lab:

RohitBisht_0-1735599702587.png

 

 

RB

Vikas_g1997
Dynatrace Guide
Dynatrace Guide

Hi @RohitBisht @AntonPineiro ,

We tried using custom exceptions and capturing them with the request attribute method, but it seems that the logs generated by the SLF4J framework are not tied to the class as expected. The issue is that the logs appear to be generated independently of the class, and this approach doesn't seem to work.

Could you please suggest a solution for capturing these logs, especially since the customer is not using log monitoring

Vikas_g1997_0-1737014562396.png

 

RohitBisht
Dynatrace Advisor
Dynatrace Advisor

Hi @Vikas_g1997 ,

I would suggest to check one agent features in settings -> preferences -> one agent features and look for optional tracing features, enable it and test it.

Best is to open a support case as this definitely needs a deep dive.

RB

Featured Posts