Streaming AppMaps with Request Recording


In this video
We enable automatic recording of a Ruby on Rails application and stream AppMaps into VS Code for each request as we interact with our application. Now available for Ruby on Rails applications, you can generate AppMaps for each request automatically by simply running your application locally and interacting or making API requests.

Links mentioned
Rails Sample Application
Early Access to AppMap Analysis
Requests Recording
Requests Recording in Rails


Follow along

In this tutorial we are going to show you the latest way to generate AppMaps for your application, streaming AppMaps for each request.

This feature is currently available for Ruby on Rails applications with upcoming support for Python applications as well.

Install AppMap agent

You can add AppMap to your project now by simply clicking the automated installer. This automatically adds the AppMap libraries to your project and will run your projects’ package manager such as Bundler, Pip, Poetry, and others.

You could also skip the automated installer and add this to the top of your Gemfile in this Rails example.

# This must be the first gem listed
gem 'appmap', group: %i[test development]

With AppMap installed in this project, we can now start recording. You can record AppMaps by running your test cases, or by starting a remote recording of a user interaction. But now you can simply just start your project and AppMap will automatically record every request as it happens.

I will now start my rails application, this is our AppMap merch store based on the open source project Solidus. You will see AppMap is enabled by default for the development environment.

I can now interact with my application and AppMaps will start to stream into my code editor. We’ll highlight HTTP server requests, SQL Queries, and highlight important AppMaps.

I can then open these AppMaps to see which packages and functions interact with my database for example.

And of course, AppMap will be continually alerting on performance and security issues for this project with AppMap Analysis.

With that we find an authorization happening before authentication. This is the #1 security flaw on the OWASP Top Ten - and no other tool can detect it.

Head over to download to get started with our VS Code or JetBrains extension and add AppMap to your project today.

Next step: Navigating AppMaps


Was this page helpful? thumb_up Yes thumb_down No
Thank you for your feedback!