Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teodor-pripoae/opbeat
Opbeat client for Elixir
https://github.com/teodor-pripoae/opbeat
Last synced: 3 months ago
JSON representation
Opbeat client for Elixir
- Host: GitHub
- URL: https://github.com/teodor-pripoae/opbeat
- Owner: teodor-pripoae
- Created: 2015-04-05T21:31:51.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-12-18T01:09:57.000Z (about 5 years ago)
- Last Synced: 2024-10-10T12:21:21.756Z (3 months ago)
- Language: Elixir
- Size: 23.4 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Elixir client for Opbeat. (Third Party APIs)
- fucking-awesome-elixir - opbeat - Elixir client for Opbeat. (Third Party APIs)
- awesome-elixir - opbeat - Elixir client for Opbeat. (Third Party APIs)
README
Opbeat
======Elixir client for [Opbeat](https://opbeat.com).
##Installation
Add module to `mix.exs`
```elixir
def application do
[applications: [:logger, :opbeat]]
enddef deps do
[{:opbeat, github: "teodor-pripoae/opbeat"}]
end
```Add following settings to `config.exs`
```elixir
config :opbeat, :auth,
%{org_id: System.get_env("OPBEAT_ORG_ID"), \
app_id: System.get_env("OPBEAT_APP_ID"), \
app_secret: System.get_env("OPBEAT_APP_SECRET")}
```By default Opbeat logging is disabled. You must enabled it for `production.exs` or `staging.exs`
```elixir
config :opbeat, :enabled, true
```##Usage
To report and error:
```elixir
if Opbeat.Client.enabled do
Opbeat.Client.report(e)
end
```You can also pass options `misc` and `extra` as `Map`:
```elixir
Opbeat.Client.report(e, %{mymisc: "Some Value"}, %{myextra: "aaaa"})
```##TODO
- [ ] add support for http connection info
- [ ] more tests with [VCR](https://github.com/parroty/exvcr)
- [ ] show more stacktrace information so it can be formatted properly on opbeat
- [ ] make requests with [HTTPoison.AsyncResponse](https://github.com/edgurgel/httpoison#async-requests)