by es



Sonar is a an app for collecting network debugging information from customers. It's largely inspired by Fastly's debug page.


How to use Sonar

Each debug session has a uniquie link generated through the admin. In addition to debug data, you can store notes related to the issue.


Debug sessions can be inspected, created, and searched by going to /admin. Authentication is managed with Google OAuth and validated by the permitted_login_emails regex.


All configuration lives in config/settings.yml. There are 4 configuration values, 3 of which are required (and marked as such). For simplifying deployment to Heroku, you can also set the above config values through environment variables.

Note: Environment variables take priority over values defined in config/settings.yml.

  • title (REQUIRED): The title of the debug page (i.e. inserted into the page's <title>). Can also be set with the environment variable SETTINGS_TITLE.

  • header (REQUIRED): The header on the debug page, typically the name of your company. Can also be set with the environment variable SETTINGS_HEADER.

  • permitted_login_emails (REQUIRED): The regex with which emails are checked when logging into the admin. Can also be set with the environment variable SETTINGS_PERMITTED_LOGIN_EMAILS.

  • logo_url: If present, an img pointing at logo_url will be included before the header on the debug page. Note, the logo & header are displayed on the same line. Can also be set with the environment variable SETTINGS_LOGO_URL.

The config the demo app uses:

title: "Acme Co. | Debug"
header: "Acme Co. | Debug"
permitted_login_emails: .*


Auth is done with Google OAuth. The client ID and secret need to be present as environment variables (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET respectively). Generate a new pair in the Google Developer Console. Use http(s)://SITE_DOMAIN as the JavaScript origin and http(s)://SITE_DOMAIN/auth/google_oauth2/callback as the redirect URI.


To develop the app locally, copy .env.sample to .env and fill in the missing values.