Closed johnnyfeng closed 6 years ago
This fixes an error that pops up when testing apps using this library that happens because ScoutApm.ApplicationLoadNotification tries to access the ets table created by the cache before the table is set up.
ScoutApm.ApplicationLoadNotification
[error] GenServer ScoutApm.ApplicationLoadNotification terminating ** (ArgumentError) argument error (stdlib) :ets.lookup(:scout_cache, :hostname) (scout_apm) lib/scout_apm/cache.ex:15: ScoutApm.Cache.hostname/0 (scout_apm) lib/scout_apm/payload/app_server_load.ex:16: ScoutApm.Payload.AppServerLoad.new/0 (scout_apm) lib/scout_apm/application_load_notification.ex:33: ScoutApm.ApplicationLoadNotification.handle_cast/2 (stdlib) gen_server.erl:616: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:686: :gen_server.handle_msg/6 (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3 Last message: {:"$gen_cast", {:run, [retries: 3]}}
Thank you! I will push a new release with this patch.
This fixes an error that pops up when testing apps using this library that happens because
ScoutApm.ApplicationLoadNotification
tries to access the ets table created by the cache before the table is set up.