mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:01:22 +08:00
improve metrics gathered using in our traffic section
this also pulls out the middleware into its own home and inserts in front
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
class ApplicationRequest < ActiveRecord::Base
|
||||
enum req_type: %i(anon logged_in crawler)
|
||||
enum req_type: %i(total success background topic_anon topic_logged_in topic_crawler server_error client_error redirect)
|
||||
|
||||
cattr_accessor :autoflush
|
||||
# auto flush if backlog is larger than this
|
||||
self.autoflush = 100
|
||||
self.autoflush = 200
|
||||
|
||||
def self.increment!(type, opts=nil)
|
||||
key = redis_key(type)
|
||||
|
Reference in New Issue
Block a user