Generate AppMaps with Request Recording

You can configure your application to record an AppMap of each HTTP server request.

Some characteristics of request recording include:

  • Named for the route The name of each AppMap contains the HTTP request method and path, so you can see at a glance what request AppMap contains.
  • Sortable by timestamp In the AppMap extension, requests AppMaps are sorted by timestamp, with newest AppMaps at the top. So you can see a chronology of the requests that your app is serving.

For details on requests recording, see:

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
Requests Recording in Python

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, as well as Python applications that use Django or Flask.

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 the Get AppMap page to get started with our VS Code or JetBrains extension and add AppMap to your project today.

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