Transaction name keep using asterisks `GET *` instead of original endpoint used
Here i use end point GET /contacts but on apm the transaction name always show as GET *.
const getHandler = async (_, res) => {
/// real implementation
const filteredContacts = await contactService.fetchByType(payload);
return res.send(filteredContacts);
};
when i change fetchByType to simple non asynchronous method, the transaction name correctly display on apm server with GET /contacts.

anyone know what is going on with that? the url.original is correctly display

only transaction name on apm server said it GET /*
Thanks for reporting this @ranuwp. We haven't seen this specific problem before, but we're happy to help track down the root cause. Could you let us know which HTTP framework (express, hapi, koa, etc.) you're using and what your route configuration looks like? Both of these can effect what your final transaction or span name ends up being.
Thanks for reporting this @ranuwp. We haven't seen this specific problem before, but we're happy to help track down the root cause. Could you let us know which HTTP framework (express, hapi, koa, etc.) you're using and what your route configuration looks like? Both of these can effect what your final transaction or span name ends up being.
i use Express. i use default configuration. currently to solve this issue I need to manually set transaction name by doing
apm.setTransactionName(`${request.method} ${request.route.path}`);
to make it consistent to use path as transaction name.
Glad to hear the setTransactionName API was able to help you out here @ranuwp.
We haven't been able to reproduce the problem you reported. A reproduction is our first step towards understanding the issue and getting a fix it. It's not 100% clear to us how you're using your async getHandler function.
In our attempts to reproduce this problem we created an async express handler like this
app.get('/github-2168', async function(req, res) {
return res.send({hello:"world"})
})
and then requested the URL http://localhost:3000/github-2168 -- in this case the transaction was named correctly, without the *.
Would you be able to provide a stand alone reproduction of this behavior? If not, would you be able to share the route configuration (the app.get(routename) part of your application) and how that configuration is using this getHandler function? No worries if not, but the more information we have the better positioned we'll be to solve this problem at it's root.
The case is intermittent in some project on my company, I try to do async method using simple route and class in ExpressJS it was working properly. And current solution only to set manually the transaction name. Thanks