All Projects → mikhailvs → rack-fluentd-logger

mikhailvs / rack-fluentd-logger

Licence: MIT License
Rack middleware to send traffic logs to Fluentd

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to rack-fluentd-logger

Client ruby
Prometheus instrumentation library for Ruby applications
Stars: ✭ 369 (+1657.14%)
Mutual labels:  rack, middleware
Secure headers
Manages application of security headers with many safe defaults
Stars: ✭ 2,942 (+13909.52%)
Mutual labels:  rack, middleware
express-firebase-middleware
🔥 Express middleware for your Firebase applications
Stars: ✭ 53 (+152.38%)
Mutual labels:  middleware
Guardian
Service Side Swift:Vapor 3 based API Guardian Middleware. 🦁
Stars: ✭ 90 (+328.57%)
Mutual labels:  middleware
rmw ecal
ROS2 middleware based on eCAL
Stars: ✭ 30 (+42.86%)
Mutual labels:  middleware
interface-doc
The technical specification of the data interface that describes how to integrate the fiskaltrust Middleware into POS systems.
Stars: ✭ 17 (-19.05%)
Mutual labels:  middleware
serverless-rack
Serverless plugin to deploy Ruby Rack applications (Sinatra/Rails/Padrino/Cuba etc.) and bundle gems
Stars: ✭ 58 (+176.19%)
Mutual labels:  rack
express-ping
Let all your express applications expose a common API to inform about their internal status and health.
Stars: ✭ 50 (+138.1%)
Mutual labels:  middleware
deepword
Web editor based on Monaco
Stars: ✭ 25 (+19.05%)
Mutual labels:  middleware
rbac
RBAC - Simple, concurrent Role Based Access Control(GO)
Stars: ✭ 67 (+219.05%)
Mutual labels:  middleware
express-view-cache
Unobtrusive solution to express framework - cache rendered page, without database requests and rendering.
Stars: ✭ 20 (-4.76%)
Mutual labels:  middleware
fluent-plugin-cloudwatch-ingest
Alternative to ryotarai/fluent-plugin-cloudwatch-logs for ingesting AWS Cloudwatch logs via fluentd
Stars: ✭ 11 (-47.62%)
Mutual labels:  fluentd
fluency
High throughput data ingestion logger to Fluentd, AWS S3 and Treasure Data
Stars: ✭ 135 (+542.86%)
Mutual labels:  fluentd
doa
A middleware framework for Deno's http serve🦕. Transplanted from Koa with ❤️
Stars: ✭ 20 (-4.76%)
Mutual labels:  middleware
jwt-auth
JSON Web Token Authentication for Laravel and Lumen
Stars: ✭ 46 (+119.05%)
Mutual labels:  middleware
dog
Full repository for the Dog gateway
Stars: ✭ 21 (+0%)
Mutual labels:  middleware
express-xml-bodyparser
Simple XML body parser connect/express middleware
Stars: ✭ 64 (+204.76%)
Mutual labels:  middleware
mooseware
💀 Skeleton for writing a middleware handler
Stars: ✭ 47 (+123.81%)
Mutual labels:  middleware
server-timing
Collect backend metrics and provide them as Server-Timing header in your responses
Stars: ✭ 34 (+61.9%)
Mutual labels:  middleware
phpdebugbar
PSR-15 middleware for PHP Debug bar
Stars: ✭ 64 (+204.76%)
Mutual labels:  middleware

Rack Fluentd Logger

Gem Version

Install

Gemfile:

gem 'rack-fluentd-logger'

Shell:

gem install rack-fluentd-logger

Usage

config.ru

require 'rack-fluentd-logger'

Rack::FluentdLogger.configure(
  name: 'your-app-log-name',
  host: 'your-fluentd-host',
  port: 24224
)

use Rack::FluentdLogger

run YourApplication

Configuration Options

name default description
name ENV['FLUENTD_NAME'] application name to use for fluentd logs
host ENV['FLUENTD_HOST'] fluentd server hostname/ip
port ENV['FLUENTD_PORT'] || 24_224 fluentd server port
json_parser ->(str) { JSON.parse(str) } used to parse response bodies if they are application/json
preprocessor ->(s) { s } callback for any additional processing/scrubbing of data before sending it off

Event Data

Events sent to fluentd have the following structure

{
  env: {
    # everything from the rack env that's an array/hash/string/number
  },
  timestamp: Time.now, # current time when the log event is recorded
  response_time: 0.012, # length of time in seconds for response from rack
  code: 200, # http response code from rack app
  body: [], # body from rack app (when the content_type is json, it's parsed)
  headers: {} # http headers from the rack app
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].