Closed wittjosiah closed 5 years ago
The only thing that stands out at the moment is hostname: "my_app@${HOSTNAME}"
You shouldn't need the my_app@
The host should just be the IP or hostname of your server listening for the GELF messages.
Thanks for taking a look at this @jschniper 😄
My understanding was that host
was the server listening for the GELF messages and that hostname
was the string name of the host sending them which was dropped into the source
field in the GELF message. Did I misunderstand that? Is it the opposite?
No, you are absolutely right. Sorry, it's been a minute since I've looked at the project. Let me dig a little deeper and see what I can find.
The more I look at it the more it looks like something related to building the release. Are you using distillery or something else?
Yeah, I'm using distillery to build releases
Would you mind running MIX_ENV=prod mix release --verbose
and making sure that you see gelf_logger in there somewhere?
You're right, it doesn't seem like gelf_logger shows up in the "Discovered Applications" list. I assumed it would be included in the release as a dependency of my application, but I guess not? Do I need to include it explicitly in my distillery release config? Perhaps something like this:
release :my_app do
set(version: current_version(:my_app_web))
set(
applications: [
:logger,
:gelf_logger,
:runtime_tools,
my_app: :permanent,
my_app_web: :permanent
]
)
end
I am surprised it's not being pulled in as well. The above should work or you should be able to modify your mix.exs to include it in the applications or extra_applications list.
Seems like its working now 😄 Thanks for your help debugging this one @jschniper!
I have gelf_logger setup as dependency as such
{:gelf_logger, "~> 0.7.5"}
and myconfig/prod.exs
file is equivalent to the following:I've tried with the port both as an integer and a string. When I run my release
PORT=8080 /opt/app/bin/my_app console
as it is starting up the following happens and it crashes:I'm fairly new to the Erlang/Elixir world and not exactly sure how to decipher this. Is something misconfigured here or is it possible there there's a conflict with another dependency?