I'm using Rails 5 to serve a website and a RESTful API, and I use Newrelic (newrelic_rpm
gem) to monitor the application performance.
At the moment, the gem monitor to all requests to one application name.
let's say my routes looks something like:
Rails.application.routes.draw do
resources :users
namespace :api do
namespace :v1 do
resources :users, only: :index
end
end
end
Here /users
is the route for the web app and api/users
is the route for the API. For now, once I use newrelic_rpm
it won't see the different between the API and the web.
I want to make more separation for the reports so I can log web requests to a specific app name, ex: web_app
and for the API another name api_app
.
Any help?