Webhook requests events data, where is it saved, and how to switch the logging off?

Just playing around with webhooks and it is nice to see the latest requests made.

@team -> Are all those logs saved forever (in the database) or periodically erased by sidekiq or limited to a max number (e.g. last 1000 requests)? If not, an option to clear, and to switch the logging on or off for a webhook would be nice.

Just concerned this will grow to an enormous size and a lot of unnecessary write requests to either the database (if stored in the db, don’t know) or to the disk, if permanently on as of now (and no option to switch logging off if dev work has been done).

There is a job that runs once a day to clear out old webhook event logs:
https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/purge_old_web_hook_events.rb

2 Likes

Perfect. That’s good to know.

Maybe adding the possibility to switch logging on/off per webhook sometime in the future would be nice in order to reduce the load on resources e.g. when s.o. is using webhooks extensively and has all on, but dev debugging is not needed anymore.

1 Like