No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-06-27 13:54:20 -04:00
lib Add average running time 2023-06-27 13:32:29 -04:00
test Initial Commit: It works! 2023-06-27 13:32:29 -04:00
.formatter.exs Initial Commit: It works! 2023-06-27 13:32:29 -04:00
.gitignore Initial Commit: It works! 2023-06-27 13:32:29 -04:00
LICENSE Initial Commit: It works! 2023-06-27 13:32:29 -04:00
mix.exs Initial Commit: It works! 2023-06-27 13:32:29 -04:00
mix.lock Initial Commit: It works! 2023-06-27 13:32:29 -04:00
README.md Switch demo from mp4 to gif 2023-06-27 13:54:20 -04:00
saturn_phoenix.gif Switch demo from mp4 to gif 2023-06-27 13:54:20 -04:00

SaturnPhoenix

Display Saturn-gathered query statistics in the Phoenix LiveDashboard.

video showing the "Saturn" page in Phoenix LiveDashboard live-updating with query metrics

Installation

First, you'll need to install and configure Saturn

The package can be installed by adding saturn_phoenix to your list of dependencies in mix.exs:

def deps do
  [
    {:saturn_phoenix, git: "git@github.com:instinctscience/saturn_phoenix"}
  ]
end

Next, you'll need to configure the live dashboard to show the Saturn query page. In your router.ex file, you should have a section that looks like this:

    live_dashboard "/",
      metrics: MyApp.Web.Telemetry,
      ecto_repos: [MyApp.Repo]

You'll want to add saturn: SaturnPhoenix.QueriesPage to the list after an additional_pages:, like so:

    live_dashboard "/",
      metrics: MyApp.Web.Telemetry,
      ecto_repos: [MyApp.Repo],
      additional_pages: [
	    saturn: SaturnPhoenix.QueriesPage
      ]

Now when you visit your Live Dashboard, you should see a new "Saturn" tab. Install complete!