File: datadog.md

package info (click to toggle)
ruby-exception-notification 5.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 364 kB
  • sloc: ruby: 1,350; makefile: 2
file content (51 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
### Datadog notifier

This notifier sends error events to Datadog using the [Dogapi](https://github.com/DataDog/dogapi-rb) gem.

#### Usage

Just add the [Dogapi](https://github.com/DataDog/dogapi-rb) gem to your `Gemfile`:

```ruby
gem 'dogapi'
```

To use datadog notifier, you first need to create a `Dogapi::Client` with your datadog api and application keys, like this:

```ruby
client = Dogapi::Client.new(api_key, application_key)
```

You then need to set the `client` option, like this:

```ruby
Rails.application.config.middleware.use ExceptionNotification::Rack,
  email: {
    email_prefix: "[PREFIX] ",
    sender_address: %{"notifier" <notifier@example.com>},
    exception_recipients: %w{exceptions@example.com}
  },
  datadog: {
    client: client
  }
```

#### Options

##### client

*DogApi::Client, required*

The API client to send events to Datadog.

##### title_prefix

*String, optional*

Prefix for event title in Datadog.

##### tags

*Array of Strings, optional*

Optional tags for events in Datadog.