Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const setControllerName = (reqUrl) => {
if(config.newRelicEnabled) {
const newRelic = require('newrelic');
newRelic.setControllerName(url.parse(reqUrl).pathname);
}
};