No commit activity in last 3 years
No release in over 3 years
Rack middleware for monitoring buffer of fluent-logger.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0

Runtime

 Project Readme

FluentLoggerStatistics

Build Status

Usage

Middleware settings:

Rails.configuration.middleware.use FluentLoggerStatistics::Middleware,
  '/endpoint/',
  {
    resource_name1: fluent_logger1, # instance of Fluent::Logger::FluentLogger
    resource_name2: fluent_logger2,
    ...
  }

After rails boots, then

$ curl http://rails-host/endpoint | jq .
{
  "resource_name1": {
    "buffer_bytesize": 0,
    "buffer_limit": 8388608,
    "buffer_usage_rate": 0
  },
  "resource_name2": {
    "buffer_bytesize": 236,
    "buffer_limit": 8388608,
    "buffer_usage_rate": 2.8133392333984375e-05
  }
}