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:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  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.0 KB)
  5. 0.0.4.pre.demo - April 26, 2020 (28.0 KB)
显示所有版本 (共 9 个)

业主:

推送:

作者:

  • Hugues Bernet-Rollande

SHA 256 校验和:

= 复制到剪贴板 已复制!

下载总量 12,985

这个版本 1,501

许可:

MIT

需要的 Ruby 版本: >= 0

需要的 RubyGems 版本: > 1.3.1

链接: