Open tankilo opened 3 years ago
Currently , we make a change if the application return a http status code that no included in profiler.http.status.code.errors
list, we will override the error status of the trace root as succeful. With this change , if the user want to mark the tomcat request as failed, it must return http status code that included in profiler.http.status.code.errors
list.
I think PR would be nice. But how about the other way around. I think most of the users want it to be marked as a failure when there is an SQL exception. So it would be nice to make a list of SQLs(or SQL exceptions) that should not be marked as a failure.
With your proposed method. A request that runs several jobs(ex, multiple queries, query+ another request... ) can't be distinguished.
Prerequisites
Please check the FAQ, and search existing issues for similar questions before creating a new issue.YOU MAY DELETE THIS PREREQUISITES SECTION.
Supposed that when a tomcat deal with a http request, many sqls are executed and some of them failed. But these failed sql are not important, so the application still return 200 http status code to the front user. Then in pinpoint, the span of the tomcat request is marked as failed.
This is done by
com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder#recordException(java.lang.Throwable)
I think if user has already catched the exception and prevent it from spreading to the outer method. Then the span shouldn't be marked as a failed call.