Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation regarding the supervisor children order #201

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ Prometheus data source):
$ mix prom_ex.gen.config --datasource YOUR_PROMETHEUS_DATASOURCE_ID
```

Then add the generated module to your `application.ex` file supervision tree (be sure to add it to the top of the
supervisor children list so that you do not miss any init-style events from other processes like Ecto.Repo for
example):
Then add the generated module to your `application.ex` file supervision tree at the top of the
supervisor children list so that you do not miss any init-style events from other processes like Ecto.Repo:

```elixir
defmodule MyCoolApp.Application do
Expand All @@ -113,8 +112,10 @@ defmodule MyCoolApp.Application do
def start(_type, _args) do
children = [
MyAppWeb.Endpoint,
# PromEx should be started after the Endpoint, to avoid unnecessary error messages
# PromEx should be started after the Endpoint, to avoid unnecessary error messages...
MyCoolApp.PromEx,
# ...everything else is started after to not miss any events
MyCoolApp.Repo,

...
]
Expand Down