[Java Agent] the http transaction showing in kibana has something wrong with the http status code

the problem is none of business with the kibana or browser, just java agent

Steps to reproduce:

  1. create a spring web project, and create a controller mapping to any http request
  2. the controller will throw an any custom excpetion, and handle it by spring ExceptionHandler(for example @ControllerAdvise and @ExceptionHandler), and return error message with http status code: 200
  3. start the http server and invoke the http api, the response is expected (http status code: 200)

but in kibaba, the transaction 's status code is showing as 500.

an issue is related : https://github.com/elastic/apm-agent-java/issues/1036

in my opinion: the code ( ServletTransactionHelper#doOnAfter) change the status to 500 because of the exception, but some exception can be ignore because the application already handled it.

so i think the agent should check if it should be ignore by the CoreConfiguration: ignore_exceptions!

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