{"id":15713544,"url":"https://github.com/ellmetha/marten-raven-middleware","last_synced_at":"2025-10-26T18:48:19.511Z","repository":{"id":188794784,"uuid":"678196088","full_name":"ellmetha/marten-raven-middleware","owner":"ellmetha","description":"Raven.cr integration for the Marten web framework.","archived":false,"fork":false,"pushed_at":"2025-01-11T22:10:05.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T21:26:00.324Z","etag":null,"topics":["crystal","framework","marten","raven","sentry","sentry-client","web"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/ellmetha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-14T01:40:55.000Z","updated_at":"2025-01-11T22:10:09.000Z","dependencies_parsed_at":"2024-07-11T23:57:27.662Z","dependency_job_id":"f3a681ba-ddaa-4b43-b2cf-ea49d658a5bf","html_url":"https://github.com/ellmetha/marten-raven-middleware","commit_stats":null,"previous_names":["ellmetha/marten-raven-middleware"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellmetha%2Fmarten-raven-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellmetha%2Fmarten-raven-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellmetha%2Fmarten-raven-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellmetha%2Fmarten-raven-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ellmetha","download_url":"https://codeload.github.com/ellmetha/marten-raven-middleware/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365637,"owners_count":20765546,"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":["crystal","framework","marten","raven","sentry","sentry-client","web"],"created_at":"2024-10-03T21:32:01.745Z","updated_at":"2025-10-26T18:48:14.470Z","avatar_url":"https://github.com/ellmetha.png","language":"Crystal","funding_links":[],"categories":["Marten shards"],"sub_categories":["Error Handling"],"readme":"# Marten Raven Middleware\n\n[![CI](https://github.com/ellmetha/marten-raven-middleware/workflows/Specs/badge.svg)](https://github.com/ellmetha/marten-raven-middleware/actions)\n[![CI](https://github.com/ellmetha/marten-raven-middleware/workflows/QA/badge.svg)](https://github.com/ellmetha/marten-raven-middleware/actions)\n\n**Marten Raven Middleware** provides a [Raven.cr](https://github.com/Sija/raven.cr) integration that allows you to get automatic error reporting for the [Marten web framework](https://github.com/martenframework/marten) by using a dedicated [middleware](https://martenframework.com/docs/handlers-and-http/middlewares).\n\n## Installation\n\nSimply add the following entry to your project's `shard.yml`:\n\n```yaml\ndependencies:\n  marten_raven_middleware:\n    github: ellmetha/marten-raven-middleware\n```\n\nAnd run `shards install` afterward.\n\n## Configuration\n\nFirst, add the following requirement to your project's `src/project.cr` file:\n\n```crystal\nrequire \"marten_raven_middleware\"\n```\n\nYou should then ensure that Raven.cr is [properly configured](https://github.com/Sija/raven.cr#usage). In a Marten project, you'll likely create a `config/initializers/raven.cr` initializer where you require and configure the Raven client for your project. For example:\n\n```crystal\n# config/initializers/raven.cr\n\nrequire \"raven\"\n\nRaven.configure do |config|\n  config.dsn = \"your_dsn\"\nend\n```\n\nTo get automatic error reporting for your project, you then need to add the `Raven::Marten::Middleware` middleware class to the [`middleware`](https://martenframework.com/docs/development/reference/settings#middleware) Marten setting. Ideally, this middleware should be placed near the beginning of the `middleware` array to ensure that it can catch any errors raised by the following middlewares in the stack. For example:\n\n```crystal\n# config/settings/base.cr\n\nMarten.configure do |config|\n  config.middleware = [\n    Raven::Marten::Middleware,\n    # Other middlewares...\n    Marten::Middleware::GZip,\n    Marten::Middleware::XFrameOptions,\n    Marten::Middleware::StrictTransportSecurity,\n  ]\nend\n```\n\nThat's it! From now on every exception that is raised by your handlers and middlewares will be reported to Sentry automatically.\n\n## Authors\n\nMorgan Aubert ([@ellmetha](https://github.com/ellmetha)) and \n[contributors](https://github.com/ellmetha/marten-raven-middleware/contributors).\n\n## License\n\nMIT. See ``LICENSE`` for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellmetha%2Fmarten-raven-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellmetha%2Fmarten-raven-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellmetha%2Fmarten-raven-middleware/lists"}