RubyGems Navigation menu

contextualized_logs 0.0.8.pre.alpha

Online logging solution (like [Datadog](https://www.datadoghq.com)) have drastically transform the way we log. An app will nowdays logs dozen (hundred) of logs per requests. The issue is often to correlate this logs, with the initiating request (or job) and add shared metadata on this logs. Here come `ContextualizedLogs`. The main idea is to enhance your logs from your controller (including `ContextualizedController`, which use a before action), which will add the params to your logs (and some metadata about the request itself, like `request.uuid`). This metadata are stored in a `ActiveSupport::CurrentAttributes` which is a singleton (reset per request). Each subsequent logs in this thread (request) will also be enriched with this metadata, making it easier to find all the logs associated with a request (`uuid`, `ip`, `params.xxx`). On top of this, logs can also be enriched by the ActiveRecord model they use (`create` or `find`) (models including `ContextualizedModel`). So any time a contextualized model is created or find, some metadata related to the model (`id`, ...) will also be added to the logs. Allowing you to find all logs which "touched" this models.

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 0.0.8.pre.alpha - April 30, 2020 (28.5 KB)
  2. 0.0.7.pre.alpha - April 30, 2020 (28.5 KB)
  3. 0.0.6.pre.alpha - April 30, 2020 (28.5 KB)
  4. 0.0.5.pre.alpha - April 26, 2020 (28 KB)
  5. 0.0.4.pre.demo - April 26, 2020 (28 KB)
Show all versions (9 total)

Owners:

Pushed by:

Authors:

  • Hugues Bernet-Rollande

SHA 256 checksum:

= Copy to clipboard Copied!

Total downloads 12,967

For this version 1,499

License:

MIT

Required Ruby Version: >= 0

Required Rubygems Version: > 1.3.1

Links: