Adding custom settings

AI-generated summary

Adding Custom Settings

The discussion revolves around adding custom settings to Discourse. jamesarobbo wants to add a custom setting for getsentry and store its DSN. Falco suggests using a plugin to add site settings, as Discourse is not a CMS-type system, but rather a purpose-built forum software.

jamesarobbo expresses concern about logging errors within the app in case it crashes, while Falco understands the requirement for using getsentry as a service similar to pingdom.

Sander78 mentions that logs are also stored in /var/discourse/shared/. Falco explains that some customizations are possible without code changes, but not all, and creating a plugin is reasonable for adding gems and custom code.

jamesarobbo adds a sentry initializer file to the initializers folder and expects it to be picked up when the app starts.

Hi

Is it possible to add custom settings to Discourse and if so where should i do it?

For example i want to add getsentry and need to store its DSN somewhere.

cheers

Discourse example.com/logs already have every back and front erros logged.

But if you really want this you can add site settings with a plugin.

thanks, if the logs are in the app and the app crashes how is that useful as i wouldn’t be able to see them?

So you want to use getsentry more like a pingdom service, I see.

Logs are also in /var/discourse/shared/

cheers, so you’re saying the only way to add something as simple as one setting is to create a plugin?

Discourse isn’t a library, framework or engine to build websites, is a forum software. So if you want to change the normal behavior it’s usually trough a plugin. A lot of things have site settings, you can customize a lot without touching code, but not all.

But I think that expecting a plugin to add a gem and custom code is reasonable.

brilliant, thanks. I’ve added a sentry initializer file to the initializers folder, will this be picked up when the app starts?