appsignal-ruby icon indicating copy to clipboard operation
appsignal-ruby copied to clipboard

Support logging for Puma

Open tmaier opened this issue 1 year ago • 3 comments

Puma supports custom loggers. See https://github.com/puma/puma/pull/2770

By default, puma logs only to stdout. Using the custom logger it should be possible to log to AppSignal Logging.

tmaier avatar Aug 18 '24 15:08 tmaier

Thanks for the suggestion! Not sure if it will fit in with our logging recommendations, but we'll have a look at what logs Puma sends.

tombruijn avatar Aug 22 '24 13:08 tombruijn

Well... the question is what to log. I had the issue, that on DigitalOcean App Platform the puma server did not start. They also do not have a "H18" error message, like Heroku and I was also unable (to date) to get the logs on platform-level.

This means, I was unable to see that the puma server failed and might have shown a Oout of Memory error message or a "restart event" is happneing.

tmaier avatar Aug 27 '24 07:08 tmaier

~I made some changes in PR #1393 that may make this possible, if I look at Puma's implementation.~

Oh no, they want write as a method.

I can get logs in from the app itself, but not Puma. Probably an issue with the extension not having started in the Puma main process. If I start it in the main process, I receive no logs or tracing at all.

Because of the extension issue in the main process I wonder if it's not easier to call our JSON log endpoint?

tombruijn avatar Mar 21 '25 12:03 tombruijn