Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mimiquate/tower_honeybadger
Elixir error tracking and reporting to Honeybadger
https://github.com/mimiquate/tower_honeybadger
elixir error-monitoring error-reporting error-tracking honeybadger tower
Last synced: about 2 months ago
JSON representation
Elixir error tracking and reporting to Honeybadger
- Host: GitHub
- URL: https://github.com/mimiquate/tower_honeybadger
- Owner: mimiquate
- License: apache-2.0
- Created: 2024-06-12T17:28:42.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-19T15:34:00.000Z (about 2 months ago)
- Last Synced: 2024-11-19T16:27:55.645Z (about 2 months ago)
- Topics: elixir, error-monitoring, error-reporting, error-tracking, honeybadger, tower
- Language: Elixir
- Homepage: https://hex.pm/packages/tower_honeybadger
- Size: 65.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TowerHoneybadger
[![ci](https://github.com/mimiquate/tower_honeybadger/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mimiquate/tower_honeybadger/actions?query=branch%3Amain)
[![Hex.pm](https://img.shields.io/hexpm/v/tower_honeybadger.svg)](https://hex.pm/packages/tower_honeybadger)
[![Documentation](https://img.shields.io/badge/Documentation-purple.svg)](https://hexdocs.pm/tower_honeybadger)Elixir error tracking and reporting to [Honeybadger](https://www.honeybadger.io/).
[Tower](https://github.com/mimiquate/tower) reporter for Honeybadger.
## Installation
Package can be installed by adding `tower_honeybadger` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:tower_honeybadger, "~> 0.2.2"}
]
end
```## Usage
Tell `Tower` to inform `TowerHoneybadger` reporter about errors.
```elixir
# config/config.exsconfig(
:tower,
:reporters,
[
# along any other possible reporters
TowerHoneybadger
]
)
```And configure `:tower_honeybadger`, with at least the API key.
```elixir
# config/runtime.exsif config_env() == :prod do
config :tower_honeybadger, api_key: System.get_env("HONEYBADGER_API_KEY")
end
```That's it.
It will try report any errors (exceptions, throws or abnormal exits) within your application. That includes errors in
any plug call (including Phoenix), Oban job, async task or any other Elixir process.Some HTTP request data will automatically be included in the report if a `Plug.Conn` if available when handling the error.
### Manual reporting
You can manually report errors just by informing `Tower` about any manually caught exceptions, throws or abnormal exits.
```elixir
try do
# possibly crashing code
rescue
exception ->
Tower.report_exception(exception, __STACKTRACE__)
end
```More details on https://hexdocs.pm/tower/Tower.html#module-manual-reporting.
## License
Copyright 2024 Mimiquate
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.