thank you very much for the explanation.
Regarding what we see I can confirm that the situation is mostly the first one ("...in other cases, the request is re-named by the sub-transaction controller name"). The fact is that the actual situation is not clear at all and sometime it's very difficult to understand if the transaction is renamed or duplicated.
We have the same main controller that may or may not have sub-controllers and the content may vary, so the result we see in newrelic is a bunch of different transactions, sometime named after the main controller and sometime after sub-controllers The content is very difficult to understand because transactions with the same name may end up containing very different things (if the transaction is named from the last component executed we have situation where we may have 0 or 10 controllers executed before, and grouped transactions become useless).
We already use java APIs for naming custom transactions in some situations and it's very interesting to know that manually named transactions have an higher priority and they don't get overwritten (can you confirm that this is the case also for transactions defined using APIs and not xml instrumentation?).
I guess this may solve our problems, although it would be a little bit less clean since we will have to manually define/maintain transaction names. The auto naming from spring controllers would be perfect if the precedence for 2 similarly generated transactions (both from spring request mapping) would prefer the first transaction over the last one (which I assume is the current behaviour?).
We can live with the "manual naming solution" by now, I'll try it and I'll post the results... but if there may be any chance to tweak/customize the automatic behaviour in order to change the precedence it would be even better
Let me know if you can see a way to do this or any possible future enhancement for the auto-instrumentation configuration, we already found cases were we wanted to tweak the way transactions are automatically discovered (another situation: we would like to disable transaction naming from j2ee filters at all) and it would be great to have the ability to turn off or change the priority without having to rely on manual instrumentation.