error on startup
chungwong opened this issue · 2 comments
chungwong commented
Describe the bug
[info] Application new_relic_agent exited: NewRelic.Application.start(:normal, []) returned an error: shutdown: failed to start child: NewRelic.Logger
** (EXIT) an exception was raised:
** (File.Error) could not make directory (with -p) "tmp": file already exists
(elixir 1.11.2) lib/file.ex:315: File.mkdir_p!/1
(new_relic_agent 1.22.6) lib/new_relic/logger.ex:78: NewRelic.Logger.device/1
(new_relic_agent 1.22.6) lib/new_relic/logger.ex:20: NewRelic.Logger.init/1
(stdlib 3.13.2) gen_server.erl:417: :gen_server.init_it/2
(stdlib 3.13.2) gen_server.erl:385: :gen_server.init_it/6
(stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
** (Mix) Could not start application new_relic_agent: NewRelic.Application.start(:normal, []) returned an error: shutdown: failed to start child: NewRelic.Logger
** (EXIT) an exception was raised:
** (File.Error) could not make directory (with -p) "tmp": file already exists
(elixir 1.11.2) lib/file.ex:315: File.mkdir_p!/1
(new_relic_agent 1.22.6) lib/new_relic/logger.ex:78: NewRelic.Logger.device/1
(new_relic_agent 1.22.6) lib/new_relic/logger.ex:20: NewRelic.Logger.init/1
(stdlib 3.13.2) gen_server.erl:417: :gen_server.init_it/2
(stdlib 3.13.2) gen_server.erl:385: :gen_server.init_it/6
(stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Environment
- Elixir & Erlang version
Erlang/OTP 23 [erts-11.1.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Elixir 1.11.2 (compiled with Erlang/OTP 23)
- Agent version (
mix deps | grep new_relic_agent
):
locked at 1.22.6 (new_relic_agent) 4d4f3267```
Btw, what does [this comment](https://github.com/newrelic/elixir_agent/blob/master/lib/new_relic/telemetry/ecto.ex#L7) mean?
How do i make `ecto` depend on `new_relic_agent`?
binaryseed commented
Hi there, do you happen to have a file called tmp
in the root of your project directory? The agent is trying to write a log file to tmp/new_relic.log
You can configure the logs to go elsewhere if you choose: https://hexdocs.pm/new_relic_agent/NewRelic.Config.html#logger/0
binaryseed commented
How do i make
ecto
depend onnew_relic_agent
?
This says "your Ecto app" should depend on the agent... the app that starts the Ecto Repo, not ecto itself