mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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:
parent
ebc2ad7c81
commit
08b790b3c2
14 changed files with 188 additions and 104 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue