-
Notifications
You must be signed in to change notification settings - Fork 325
Description
When the implementation of a JAX-RS service calls another Method that exposes a JAX-RS service, the name of the transaction is overriden to the name of the second method, obscuring the original call.
Steps to reproduce
Consider the following class:
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
@Path("/test")
public class TestRestService {
@GET
public void methodA(){
doSomeStuff()
methodB();
doMoreStuff()
}
@POST
public void methodB(){
doMethodBStuff()
}
}
when methodA is called via HTTP, the Transaction will be named "methodB" by APM. The call to methodA is obscured. This happens because calls to JAX-RS endpoint rename the transaction even if the method is not the entry point to the transaction.
Expected behavior
I would expec the APM-Transacton that gets traced when calling methodA via REST to be called "TestRestService#methodA" even if methodB is called inside the transaction.
Sugestion
in #748 a priority system for overriding transaction names was introduced, but names with the same NamePriority as the current name can still override the current name. Maybe this could be changed to only higher priority? Just a thought.