Ryosuke Matsumura gave a presentation on using Application Insights to aggregate logs from a Rails application. He began by introducing Application Insights and its capabilities for monitoring apps and collecting telemetry. Next, he discussed why it is important to aggregate logs, such as for analyzing errors and performance. Finally, he demonstrated how to set up Application Insights for a Rails app by adding the required gem, configuring the instrumentation key, and using the telemetry client to track events and exceptions. The presentation concluded with a live demo of Application Insights monitoring a Rails application.
10. How to use Application Insights on Rails Application?
11. How to use?
• 2016
• https://matcu.hatenablog.com/entry/2016/10/13/223402
• > Ruby on Rails Microsoft gem
• >
• > Ruby 1.9.3 is currently supported by this gem.
•
• Ruby 2.0 or later
• https://github.com/citrusbyte/appinsights
12. How to use?
•
• https://github.com/Microsoft/ApplicationInsights-Ruby
• > Ruby 1.9.3 and above are currently supported by this
gem.
•
• Gem Rails
13. How to use?
• Application Insights
• Application Type General
• Japan East …
•
14. How to use?
• INSTRUMENTATION KEY
• https://github.com/Microsoft/ApplicationInsights-Home/
wiki#getting-an-application-insights-instrumentation-key
•
• Configure > Properties
15. How to use?
• Rails Gemfile
• gem 'application_insights', github: ‘Microsoft/ApplicationInsights-Ruby'
• bundle install
• <rails_root>/config.ru
• require 'application_insights'
• use ApplicationInsights::Rack::TrackRequest, "<INSTRUMENTATION KEY>", 5
• INSTRUMENTATION KEY
•
• OK
16. How to use?
•
•
• tc = ApplicationInsights::TelemetryClient.new
'<INSTRUMENTATION KEY>'
• tc.track_event 'this action is posts#index’
• tc.track_exception e
• tc.flush