{"id":15705066,"url":"https://github.com/kyrylo/airbrake-rust","last_synced_at":"2025-05-12T15:18:50.701Z","repository":{"id":8835312,"uuid":"59903111","full_name":"kyrylo/airbrake-rust","owner":"kyrylo","description":"WIP","archived":false,"fork":false,"pushed_at":"2022-05-27T06:59:03.000Z","size":120,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T15:18:42.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/kyrylo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-28T16:11:45.000Z","updated_at":"2022-05-27T06:59:06.000Z","dependencies_parsed_at":"2022-09-26T17:50:28.870Z","dependency_job_id":null,"html_url":"https://github.com/kyrylo/airbrake-rust","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Fairbrake-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Fairbrake-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Fairbrake-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyrylo%2Fairbrake-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyrylo","download_url":"https://codeload.github.com/kyrylo/airbrake-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763962,"owners_count":21960484,"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-10-03T20:14:42.055Z","updated_at":"2025-05-12T15:18:50.046Z","avatar_url":"https://github.com/kyrylo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Airbrake Rust\n=============\n\n[![Build Status](https://travis-ci.org/kyrylo/airbrake-rust.svg?branch=master)](https://travis-ci.org/kyrylo/airbrake-rust)\n\n**The project is in the alpha stage and I don't recommend using it in\nproduction until it hits v1.0.0**. See the [v0.2.0 tag](https://github.com/kyrylo/airbrake-rust/tree/422147119de3ba16ca8915fef2ac8f50b74526bf) for documentation for the current latest release of this project.\n\n* [Airbrake Rust README](https://github.com/kyrylo/airbrake-rust)\n\nIntroduction\n------------\n\n_Airbrake Rust_ is an [Airbrake][airbrake.io] notifier library for the Rust\nProgramming language. The library provides minimalist API that enables the\nability to send Rust errors to the Airbrake dashboard.\n\nKey features\n------------\n\n* Uses the new Airbrake JSON API (v3)\u003csup\u003e[[link][notice-v3]]\u003c/sup\u003e\n* Simple, consistent and easy-to-use library API\u003csup\u003e[[link](#api)]\u003c/sup\u003e\n* Awesome performance (check out our benchmarks)\u003csup\u003e[[link](#running-benchmarks)]\u003c/sup\u003e\n* Asynchronous error reporting\u003csup\u003e[[link](#asynchronous-airbrake-options)]\u003c/sup\u003e\n* Logging support via env_logger\u003csup\u003e[[link][env_logger]]\u003c/sup\u003e\n* Support for proxying (WIP)\u003csup\u003e[[link](#proxy)]\u003c/sup\u003e\n* Support for environments\u003csup\u003e[[link](#environment)]\u003c/sup\u003e\n* Filters support (filter out sensitive or unwanted data that shouldn't be sent) (WIP)\u003csup\u003e[[link](#airbrakeadd_filter)]\u003c/sup\u003e\n* Ability to ignore errors based on any condition (WIP)\u003csup\u003e[[link](#airbrakeadd_filter)]\u003c/sup\u003e\n* SSL support (all communication with Airbrake is encrypted by default)\n\nInstallation\n------------\n\n### Cargo\n\nAdd the crate to your Cargo.toml:\n\n```toml\n[dependencies]\nairbrake = \"0.2\"\n```\n\nExamples\n--------\n\n### Basic example\n\nThis is the minimal example that you can use to test Airbrake Rust with your\nproject:\n\n```rust\nextern crate airbrake;\n\nuse std::num::ParseIntError;\n\nfn double_number(number_str: \u0026str) -\u003e Result\u003ci32, ParseIntError\u003e {\n   number_str.parse::\u003ci32\u003e().map(|n| 2 * n)\n}\n\nfn main() {\n    let mut airbrake = airbrake::configure(|config| {\n        config.project_id(\"113743\");\n        config.project_key(\"81bbff95d52f8856c770bb39e827f3f6\");\n    });\n\n    match double_number(\"NOT A NUMBER\") {\n        Ok(n) =\u003e assert_eq!(n, 20),\n        // Asynchronously sends the error to the dashboard.\n        Err(err) =\u003e {\n            airbrake.new_notice_builder()\n                .add_error(err)\n                .build()\n                .send();\n        }\n    }\n}\n```\n\nConfiguration\n-------------\n\n### project_key \u0026 project_id\n\nYou **must** set both `project_id` \u0026 `project_key`.\n\nTo find your `project_id` and `project_key` navigate to your project's _General\nSettings_ and copy the values from the right sidebar.\n\n![][project-idkey]\n\n```rust\nlet mut airbrake = airbrake::configure(|config| {\n    config.project_id(\"113743\");\n    config.project_key(\"81bbff95d52f8856c770bb39e827f3f6\");\n});\n```\n\n### host\n\nBy default, it is set to `https://app.airbrake.io`. A `host` is a web address\ncontaining a scheme (\"http\" or \"https\"), a host and a port. You can omit the\nport (80 will be assumed).\n\n```rust\nlet mut airbrake = airbrake::configure(|config| {\n    config.host(\"http://localhost:8080\");\n});\n```\n\n### proxy\n\nIf your server is not able to directly reach Airbrake, you can use proxy\nsupport. By default, Airbrake Rust uses direct connection. Note: proxy\nauthentication is not supported yet.\n\n```rust\nlet mut airbrake = airbrake::configure(|config| {\n    config.proxy(\"127.0.0.1:8080\");\n});\n```\n\n### app_version\n\nThe version of your application that you can pass to differentiate errors\nbetween multiple versions. It's not set by default.\n\n```rust\nlet mut airbrake = airbrake::configure(|config| {\n    config.version(\"1.0.0\")\n});\n```\n\nAPI\n---\n\n### airbrake\n\n#### airbrake.notify\n\nSends an error to Airbrake *asynchronously*. `error` must implement the\n[`std::error::Error`][stderror] trait. Returns `()`.\n\n```rust\nlet mut airbrake = airbrake::configure(|config| {\n    config.project_id = \"123\".to_owned();\n    config.project_key = \"321\".to_owned();\n});\n\nairbrake.notify(std::io::Error::last_os_error());\n```\n\n[airbrake.io]: https://airbrake.io\n[notice-v3]: https://docs.airbrake.io/docs/#create-notice-v3\n[env_logger]: https://crates.io/crates/env_logger\n[project-idkey]: https://s3.amazonaws.com/airbrake-github-assets/airbrake-ruby/project-id-key.png\n[stderror]: https://doc.rust-lang.org/std/error\n[json-object]: https://doc.rust-lang.org/rustc-serialize/rustc_serialize/json/enum.Json.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyrylo%2Fairbrake-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyrylo%2Fairbrake-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyrylo%2Fairbrake-rust/lists"}