mikhailvs / rack-fluentd-logger Goto Github PK
View Code? Open in Web Editor NEWRack middleware to send traffic logs to Fluentd
License: MIT License
Rack middleware to send traffic logs to Fluentd
License: MIT License
In this line it assumes that the headers will have 'Content-Type' set. If there is none, the middleware will silently crash.
https://github.com/mikhailvs/rack-fluentd-logger/blob/master/lib/rack/fluentd_logger.rb#L66
I tried to integrate this middleware with our Rails application, below is the code I used to add the middleware:
require 'rack/fluentd_logger'
Rack::FluentdLogger.configure(
name: Rails.configuration.fluentd.request_logs.name,
host: Rails.configuration.fluentd.request_logs.host,
port: Rails.configuration.fluentd.request_logs.port
)
Rails.application.config.middleware.insert 0, Rack::FluentdLogger
After starting fluentd with a debug config like below:
<source>
@type forward
port 24224
</source>
<match **>
@type stdout
</match>
Nothing appears.
After manually modified this gem by adding some debug lines and wrap some code with rescue, it seems it's because of a NameError Uninitialized Constant "Error" at line 57:
return format_response_error(response) if response.is_a?(Error)
It seems the "Error" class is not found.
Hi. Thanks for writing this gem!
We are trying to use it with a Rails 5 app. The problem is that rails pins concurrent-ruby to ~> 1.0 whereas your gem is ~> 1.1
I don't know much about concurrent-ruby. Might it be possible to require ~> 1.0 in your gem?
Thanks!
Thanks for merging the PR and updating the gemspec. So it is installing fine into the rails app now, however it raises an exception on line 5 of lib/rack/fluentd_logger.rb which is require 'concurrent-ruby'
. Concurrent's README says the line is require 'concurrent'
and when I change it to 'concurrent' it loads just fine. I would do a PR but since you've released it, it must work for you as is. thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.