LoginSignup
4
6

More than 5 years have passed since last update.

New Relicでめっちゃ簡単にRailsアプリケーションの監視をする

Posted at

advent calendar5日目です。枠が空いていたので書きます。
2日目に書いたLinuxサーバーをNew Relicで監視するのRails編について書きます。
これも5分くらいで終わります。

  • https://newrelic.com/にログインし、AMPを選択
    スクリーンショット 2016-11-26 15.37.26.png

  • Rubyを選択

  • 「Reveal license key」のボタンを押してlicense keyを取得
    スクリーンショット 2016-12-05 23.52.21.png

  • RailsのバージョンはRails3でOK
    スクリーンショット 2016-12-05 23.52.27.png

  • RailsのGemfileにgemを追加してbundle install

gem 'newrelic_rpm'
  • newrelic.ymlをダウンロードしてconfig配下に置く
    スクリーンショット 2016-12-05 23.57.39.png

  • newrelic.ymlのlicense_keyにはじめに取得したkeyをコピペ

  • デプロイ

まとめ

めっちゃ簡単。
スクリーンショット 2016-12-06 0.03.15.png

エラー箇所とかcontrollerのアクションごとのトランザクションが分かったり、 DBのクエリの時間が分かったりetc...
通知設定もできるっぽいのでめっちゃ便利そう

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6