Use ctx._matchedRoute instead of ctx.request.url for Sentry transaction name

This commit is contained in:
Sijawusz Pur Rahnama 2022-06-09 22:37:33 +02:00 committed by GitHub
parent 86e57e17f4
commit acd12eaab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ module.exports = ({ strapi }) => {
});
// Manually add transaction name
scope.setTag('transaction', `${ctx.method} ${ctx.request.url}`);
scope.setTag('transaction', `${ctx.method} ${ctx._matchedRoute}`);
// Manually add Strapi version
scope.setTag('strapi_version', strapi.config.info.strapi);
scope.setTag('method', ctx.method);