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

Update supervision tree docs in README #46

Merged
merged 1 commit into from
Nov 18, 2021
Merged
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
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies in `mix.exs`:
```elixir
def deps do
[
{:spandex_datadog, "~> 1.1"}
{:spandex_datadog, "~> 1.2"}
]
end
```
Expand All @@ -25,7 +25,12 @@ To start the datadog adapter, add a worker to your application's supervisor

```elixir
# Example configuration
opts =

# Note: You should put ApiServer before any other children in the list that
# might try to send traces before the ApiServer has started up, for example
# Ecto.Repo and Phoenix.Endpoint

spandex_opts =
[
host: System.get_env("DATADOG_HOST") || "localhost",
port: System.get_env("DATADOG_PORT") || 8126,
Expand All @@ -34,9 +39,16 @@ opts =
http: HTTPoison
]

# in your supervision tree
children = [
# ...
{SpandexDatadog.ApiServer, spandex_opts},
MyApp.Repo,
MyAppWeb.Endpoint,
# ...
]

worker(SpandexDatadog.ApiServer, [opts])
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
Supvervisor.start_link(children, opts)
```

## Distributed Tracing
Expand Down