Giter Site home page Giter Site logo

mikhailvs / rack-fluentd-logger Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 2.0 25 KB

Rack middleware to send traffic logs to Fluentd

License: MIT License

Ruby 100.00%
ruby rails rack fluentd middleware traffic-analysis monitoring logging request-logging

rack-fluentd-logger's People

Contributors

mikhailvs avatar rjayroach avatar rpbaltazar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rack-fluentd-logger's Issues

NameError Uninitialized Constant "Error"

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.

dependency of concurrent-ruby

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!

require 'concurrent' vs. 'concurrent-ruby'?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.