TODO: Add description
-
Add Skylight to your list of dependencies.
-
Add Skylight to your applications array.
-
Configure in
config/config.exs
:-
Add Skylight configuration options
config :skylight, authentication: {:system, "SKYLIGHT_AUTHENTICATION"}
-
Set up as an instrumenter for your Endpoint:
config :my_app, MyApp.Endpoint, instrumenters: [Skylight] # Add this line to existing config
-
-
Add Plug to Endpoint (
lib/APP/endpoint.ex
)defmodule MyApp.Endpoint do # Add before first plug plug Skylight.Plug end
-
Set up Ecto:
-
In
lib/APP/repo.ex
defmodule MyApp.Repo do use Skylight.Ecto.Repo # Add this line end
-
In
config/prod.secret.exs
config :my_app, MyApp.Repo, ... loggers: [{Ecto.LogEntry, :log, []}, {Skylight.Ecto.Logger, :log, []}] # Add this line
-
In
web/web.ex
Replace references to:
alias MyApp.Repo
with
alias MyApp.Repo.Skylight, as: Repo
-
$ mix deps.get
$ mix skylight.fetch
$ DIREWOLF_PHOENIX_TOKEN=TEST_APP_AUTH_TOKEN mix test
If you have issues with crypto/OpenSSL try installing Erlang from https://packages.erlang-solutions.com/erlang/.