{"id":21519348,"url":"https://github.com/alexwayfer/flame-sentry_context","last_synced_at":"2026-01-30T06:34:31.709Z","repository":{"id":58572638,"uuid":"532528543","full_name":"AlexWayfer/flame-sentry_context","owner":"AlexWayfer","description":"Helper class for Sentry reports from Flame web applications","archived":false,"fork":false,"pushed_at":"2025-03-26T16:51:06.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T22:08:37.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AlexWayfer.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":"2022-09-04T12:06:10.000Z","updated_at":"2025-03-26T16:51:09.000Z","dependencies_parsed_at":"2023-12-01T18:24:42.424Z","dependency_job_id":"e4e0a6ac-9a18-4f26-8dd1-207d27ea7c1b","html_url":"https://github.com/AlexWayfer/flame-sentry_context","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":0.4,"last_synced_commit":"80c022c246c5cc67c26e0c99dfce8d6d623d920f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-sentry_context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-sentry_context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-sentry_context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fflame-sentry_context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexWayfer","download_url":"https://codeload.github.com/AlexWayfer/flame-sentry_context/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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-24T00:57:30.467Z","updated_at":"2026-01-30T06:34:31.656Z","avatar_url":"https://github.com/AlexWayfer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flame Sentry Context\n\n[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/flame-sentry_context?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/flame-sentry_context)\n[![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/flame-sentry_context/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/flame-sentry_context)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/flame-sentry_context.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/flame-sentry_context)\n[![Inline docs](https://inch-ci.org/github/AlexWayfer/flame-sentry_context.svg?branch=main)](https://inch-ci.org/github/AlexWayfer/flame-sentry_context)\n[![License](https://img.shields.io/github/license/AlexWayfer/flame-sentry_context.svg?style=flat-square)](https://github.com/AlexWayfer/flame-sentry_context/blob/main/LICENSE.txt)\n[![Gem](https://img.shields.io/gem/v/flame-sentry_context.svg?style=flat-square)](https://rubygems.org/gems/flame-sentry_context)\n\nHelper class for [Sentry](https://sentry.io/) reports\nvia [`sentry-ruby` gem](https://rubygems.org/gems/sentry-ruby)\nfrom [Flame](https://github.com/AlexWayfer/flame) web applications.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'flame-sentry_context'\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself as:\n\n```shell\ngem install flame-sentry_context\n```\n\n## Usage\n\nDefault loggers:\n\n*   [`:puma`](https://puma.io/)\n*   `:server`\n*   `:not_found`\n*   `:translations` ([R18n](https://github.com/r18n/r18n))\n*   `:validation_errors` ([Formalism R18n Errors](https://github.com/AlexWayfer/formalism-r18n_errors))\n\nYou can change them via `Flame::SentryContext.loggers` reader.\n\nExample from [Flame application template](https://github.com/AlexWayfer/flame-cli/tree/main/template):\n\n```ruby\nrequire 'flame/sentry_context'\n\nmodule MyApplication\n  ## Base controller for any others controllers\n  class Controller \u003c Flame::Controller\n    protected\n\n    def not_found\n      unless request.bot?\n        Flame::SentryContext.new(:not_found, controller: self).capture_message\n      end\n\n      super\n    end\n\n    def server_error(exception)\n      Flame::SentryContext.new(:server, controller: self).capture_exception(exception)\n\n      super\n    end\n\n    private\n\n    ## This can be used as `capture_validation_errors form_outcome.errors.translations`\n    ## inside `else` of `if (form_outcome = @form.run).success?` condition.\n    def capture_validation_errors(errors)\n      Flame::SentryContext.new(\n        :validation_errors,\n        controller: self,\n        form_class: @form.class,\n        errors: errors\n      ).capture_message\n    end\n  end\nend\n```\n\nYou can pass `:user` into initialization or redefine `user` getter globally via:\n\n```ruby\n## By default it's `nil`\nFlame::SentryContext.user_block = -\u003e { @controller\u0026.send(:authenticated)\u0026.account }\n```\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\n\nThen, run `toys rspec` to run the tests.\n\nTo install this gem onto your local machine, run `toys gem install`.\n\nTo release a new version, run `toys gem release %version%`.\nSee how it works [here](https://github.com/AlexWayfer/gem_toys#release).\n\n## Contributing\n\nBug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/flame-sentry_context).\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fflame-sentry_context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexwayfer%2Fflame-sentry_context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fflame-sentry_context/lists"}