{"id":19133991,"url":"https://github.com/umbrellio/lamian","last_synced_at":"2025-04-15T10:51:02.455Z","repository":{"id":10393203,"uuid":"65602937","full_name":"umbrellio/lamian","owner":"umbrellio","description":"Lamian is an extension to exception notification system, which helps to add logs of current request/job to the exception report","archived":false,"fork":false,"pushed_at":"2024-12-12T11:08:18.000Z","size":84,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T19:13:09.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umbrellio.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-13T06:28:32.000Z","updated_at":"2024-12-12T11:07:28.000Z","dependencies_parsed_at":"2024-11-09T06:36:54.520Z","dependency_job_id":null,"html_url":"https://github.com/umbrellio/lamian","commit_stats":{"total_commits":38,"total_committers":7,"mean_commits":5.428571428571429,"dds":0.6578947368421053,"last_synced_commit":"ecd3501e116ef6d6a1e2b52c2eef5258f7ef2484"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Flamian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Flamian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Flamian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umbrellio%2Flamian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umbrellio","download_url":"https://codeload.github.com/umbrellio/lamian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657868,"owners_count":21140844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T06:24:40.105Z","updated_at":"2025-04-15T10:51:02.434Z","avatar_url":"https://github.com/umbrellio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lamian\n[![Actions Status](https://github.com/umbrellio/lamian/workflows/Test/badge.svg)](https://github.com/umbrellio/lamian/actions) [![Coverage Status](https://coveralls.io/repos/github/umbrellio/lamian/badge.svg?branch=master)](https://coveralls.io/github/umbrellio/lamian?branch=master) [![Gem Version](https://badge.fury.io/rb/lamian.svg)](https://badge.fury.io/rb/lamian)\n\n\nLamian is an in-memory logger, which content could be released for error messages.\nIt is designed to work in pair with `exception_notification` gem inside rails\naplications\n\n## Usage with ExceptionNotification\n\n1. Add `gem 'lamian'` into your Gemfile\n2. Extend `Rails.logger` and any other loggers you want to mirror by\n`Lamian::LoggerExtension`: `Lamian.extend_logger(logger)`\n3. Add 'request_log' section inside your `ExceptionNotification.configure`\n(see [ExceptionNotification README](https://github.com/smartinez87/exception_notification/blob/master/README.md))\n4. ExceptionNotification's messages would have 'Request Log' section\n\n## Extended Usage\n\nAdd a 'request_log' section into ExceptionNotification's background section.\nAdd `Lamian.run { }` around code with logs you want to collect. Note, that\nlogs would be accessible only inside this section and removed after section end.\n\n## Sentry (sentry-ruby)\n\n### Usage\n\nIt automatically redefines `Sentry.configuration.before_send` callback\nif Sentry initialization is completed. If `before_send` is already defined\nit wraps custom callback.\n\nIf you work with rails the `Lamian::Engine` will be automatically initialized, that additionally\nadds `Lamian::Middleware` in the first position in your Rails Application middleware stack.\n\nIf you need to manually configure the middleware stack use `Lamian.config.middleware_autoset=false.\n\n```ruby\nLamian.configure do |config|\n  config.middleware_autoset = false\nend\n\nRails.configuration.middleware.use_after(YourSignificantMiddlewareInStack, Lamian::Middleware)\n```\n\n### Usage with Sidekiq\n\nYou should add Lamian middleware to the Sidekiq initializer like this:\n\n```ruby\nconfig.server_middleware do |chain|\n  chain.prepend(Lamian::SidekiqSentryMiddleware)\nend\n```\n\n### Usage with SemanticLogger\n\nYou should add Lamian appender to the SematicLogger appenders like this:\n\n```ruby\nSemanticLogger.add_appender(appender: Lamian::SemanticLoggerAppender.new)\n```\n\n### Patching Sentry Scope\n\nIf you want to send events asynchronously you need to patch `Sentry::Scope`.\n\n```ruby\n# Somewhere in a initializer.\n\nSentry::Scope.prepend(Lamian::SentryScopePatch)\n```\n\n## Raven (deprecated)\n\n### Usage\n\nAdd this line to your Sentry initializer:\n\n```ruby\nRaven::Context.prepend(Lamian::RavenContextExtension)\n```\n\n### Usage with Sidekiq\n\nYou should add Lamian middleware to the Sidekiq initializer like this:\n\n```ruby\nconfig.server_middleware do |chain|\n  chain.prepend(Lamian::SidekiqRavenMiddleware)\nend\n```\n\n## Contribution\n\nFeel free to contribute by making PRs and Issues on [GitHub](https://github.com/JelF/lamian)\nYou also can contact me using my email begdory4+lamian@gmail.com\n\n## TODO\n\n- It probably should be separated to `lamian` and `lamian-rails` gems.\nRails dependency is never cool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumbrellio%2Flamian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumbrellio%2Flamian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumbrellio%2Flamian/lists"}