Closed john-griffin closed 5 years ago
It looks like the Telemetry application isn't started at the point the Scout integration call happens. This is odd, since I think the dependencies between apps should be YourApp -> EctoSql -> Telemetry, so they all should be started before the Scout register call happens.
Can you check for the telemetry app running at the startup of your app, and see if that's not starting for some reason?
@mitchellhenke - any other ideas?
How do I know if the Telemetry app is running? The only changes we made were to upgrade the packages and switch to the new style integration as suggested in the docs.
Application.loaded_applications()
and Application.started_applications()
can tell you what the VM knows about, and has actually started.
It sounds like you upgraded your application - can you paste the list of applications you have in your mix.exs file? applications
and deps
and so on.
This elixir forum thread may be relevant: https://elixirforum.com/t/upgrading-to-ecto-3-and-ecto-sql-no-ecto-sql-otp-application-running/17760/4
The same problem here.
Didn't dig into it much but it seems to work when I run mix phx.server
and not for db tasks (like mix ecto.migrate
) nor mix test
.
telemetry
appears in the list for mix phx.server
and not when I run mix test
.
@etehtsea can you gist your dependencies and extra_applications
in your mix.exs
?
if you don't have ecto_sql
or telemetry
in your direct dependencies and they aren't being started in extra_applications
, you may see the above issue.
We recently upgraded to elixir 1.8.1 and scout_apm 0.4.11. The telemetry and ecto_sql apps are running but we are still not seeing any database traces in Scout.
@john-griffin would you mind emailing support@scoutapp.com with your Scout ecto instrumentation call. It'll be easier to give support there, rather than here on Github.
Closing this issue for now as there haven't been any recent reports. If you do run into this, please let us know!
I seem to also be hitting this error.
I have :telemetry
, :ecto_sql
and :new_relic_agent
in my Application.loaded_applications()
and Application.started_applications()
when run from iex -S mix
.
I can post a gist with my setup or email. @cschneid any preferences? Please and thank you 😄
@wcpines Do you have the handler being added in your Repo's init callback or in your Application's start callback? I think previous documentation suggested putting it in the Repo callback, but it should be in the Application start. Ex:
defmodule MyApp.Application do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
# ...
]
# ...
:ok = ScoutApm.Instruments.EctoTelemetry.attach(MyApp.Repo)
Supervisor.start_link(children, opts)
end
end
Solved. Thank you 😍
We get the following error when booting the app using the new Ecto 3 telemetry integration.