So turns out when you run sails lift
on the command line it doesn't actually use the app.js file.
To use that you have to do node app.js
.
My app.js now looks like this;
global.newrelic = require('newrelic');
require('sails').lift(require('optimist').argv);
then in layout.ejs
you can add
<%- global.newrelic.getBrowserTimingHeader() %>
Putting stuff in the global might not be the best solution, however whenever I put it into the sails.config the object got messed up :(