Open eyalkoren opened 5 years ago
Why not supporting the parametrized url that most frameworks have already implemented ?
eg. RequestMapping
Yeah, it would be a nice addition. We just recently added that for the @Path
annotation.
This POC is something I wrote to demonstrate an algorithm that ALL Elastic APM agents can use in order to deal with a general problem that some agents have (in fact, other agents like Node more than Java) of computing the transaction name too late for some decision making, like whether to sample or not. With this, we can can do some decision making right when encountering the request.
I added this issue suggesting we can add it for transaction naming as well because it is the most generic approach (not restricted to specific frameworks) and because it can provide good feedback for us about how the algorithm behaves in real world applications.
When the
use_path_as_transaction_name
config option is used, this can lead to transaction name explosion if path parameters are used. For this purpose, we also have theurl_groups
config option, but it requires (possibly complex) user configuration. By applying the algorithm presented in this POC, the agent can auto-discover URL path patterns and use them as transaction names.The additional advantage of implementing this now is that we will have the option of testing this algorithm, which we may want to employ in the future to facilitate head-based sampling.