eye-sentry 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +59 -0
- data/LICENSE +21 -0
- data/README.md +63 -0
- data/Rakefile +2 -0
- data/examples/sentry.eye +19 -0
- data/eye-sentry.gemspec +26 -0
- data/lib/eye/notify/sentry.rb +25 -0
- data/lib/eye/notify/sentry/version.rb +9 -0
- metadata +109 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 25f2264d54ac6dd2eb4e45f96517128d479b567846c01a3c01ec03929f40eae4
|
4
|
+
data.tar.gz: 34ef29df3ef7b60931028f6fdc0af8a7b49ea62f6de7d21ba44e02edfbb8ed98
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9ba1ea8ed3bdf2cc7519e75ba279d9eb878f265cd6088e385cb6cfb3cf5a00806ea3dd99ef86ab8c0cdd76ef8534cb262ddb7e38a49b7f2cfc49db8297613939
|
7
|
+
data.tar.gz: a37e68dd03c9352e93f848fdb124e143848251bd34a814b06ee8fe0b255d82abbfd2aff106c36bac61b657eb271acf9a2fd187d6c677a3c93aaf9d94e782a6df
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
eye-sentry (0.1.0)
|
5
|
+
eye (~> 0.10)
|
6
|
+
sentry-raven (~> 2.7)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
celluloid (0.17.3)
|
12
|
+
celluloid-essentials
|
13
|
+
celluloid-extras
|
14
|
+
celluloid-fsm
|
15
|
+
celluloid-pool
|
16
|
+
celluloid-supervision
|
17
|
+
timers (>= 4.1.1)
|
18
|
+
celluloid-essentials (0.20.5)
|
19
|
+
timers (>= 4.1.1)
|
20
|
+
celluloid-extras (0.20.5)
|
21
|
+
timers (>= 4.1.1)
|
22
|
+
celluloid-fsm (0.20.5)
|
23
|
+
timers (>= 4.1.1)
|
24
|
+
celluloid-io (0.17.3)
|
25
|
+
celluloid (>= 0.17.2)
|
26
|
+
nio4r (>= 1.1)
|
27
|
+
timers (>= 4.1.1)
|
28
|
+
celluloid-pool (0.20.5)
|
29
|
+
timers (>= 4.1.1)
|
30
|
+
celluloid-supervision (0.20.6)
|
31
|
+
timers (>= 4.1.1)
|
32
|
+
eye (0.10.0)
|
33
|
+
celluloid (~> 0.17.3)
|
34
|
+
celluloid-io (~> 0.17.0)
|
35
|
+
kostya-sigar (~> 2.0.0)
|
36
|
+
state_machines
|
37
|
+
thor
|
38
|
+
faraday (0.15.4)
|
39
|
+
multipart-post (>= 1.2, < 3)
|
40
|
+
kostya-sigar (2.0.5)
|
41
|
+
multipart-post (2.0.0)
|
42
|
+
nio4r (2.3.1)
|
43
|
+
rake (10.5.0)
|
44
|
+
sentry-raven (2.7.4)
|
45
|
+
faraday (>= 0.7.6, < 1.0)
|
46
|
+
state_machines (0.5.0)
|
47
|
+
thor (0.20.3)
|
48
|
+
timers (4.2.0)
|
49
|
+
|
50
|
+
PLATFORMS
|
51
|
+
ruby
|
52
|
+
|
53
|
+
DEPENDENCIES
|
54
|
+
bundler (~> 1.7)
|
55
|
+
eye-sentry!
|
56
|
+
rake (~> 10.0)
|
57
|
+
|
58
|
+
BUNDLED WITH
|
59
|
+
1.16.3
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Maciej Głowacki
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Eye::Sentry
|
2
|
+
|
3
|
+
Sentry reporter for eye process monitoring.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'eye'
|
11
|
+
gem 'eye-sentry'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install eye-sentry
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
this is an example configuration file
|
25
|
+
|
26
|
+
````
|
27
|
+
# Notify example
|
28
|
+
require 'eye/notify/sentry'
|
29
|
+
|
30
|
+
Eye.config do
|
31
|
+
sentry extra_context: { some_value: 'foo' }
|
32
|
+
contact :dev, :sentry, 'http://your-dsn@example.com/project-id'
|
33
|
+
logger '/tmp/eye.log'
|
34
|
+
end
|
35
|
+
|
36
|
+
Eye.application 'test' do
|
37
|
+
notify :dev, :debug
|
38
|
+
stdall '/tmp/eye-example.log'
|
39
|
+
|
40
|
+
process :some_process do
|
41
|
+
start_command 'sleep 120'
|
42
|
+
daemonize true
|
43
|
+
pid_file '/tmp/sleep.pid'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
````
|
47
|
+
|
48
|
+
**NOTE** You need to quit eye and load it back after adding `require`.
|
49
|
+
|
50
|
+
# Configuration
|
51
|
+
|
52
|
+
* add `sentry` line to `Eye.config` section and check following parameters
|
53
|
+
* `extra_context` - hash with any additional data you want to have reported
|
54
|
+
|
55
|
+
* add `contact` line to `Eye.config` and pass your project DSN as the third argument
|
56
|
+
|
57
|
+
## Contributing
|
58
|
+
|
59
|
+
1. Fork it ( https://github.com/bombasarkadian/eye-sentry/fork )
|
60
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
61
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
62
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
63
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/examples/sentry.eye
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Notify example
|
2
|
+
require 'eye/notify/sentry'
|
3
|
+
|
4
|
+
Eye.config do
|
5
|
+
sentry extra_context: { some_value: 'foo' }
|
6
|
+
contact :dev, :sentry, 'http://your-dsn@example.com/project-id'
|
7
|
+
logger '/tmp/eye.log'
|
8
|
+
end
|
9
|
+
|
10
|
+
Eye.application 'test' do
|
11
|
+
notify :dev, :debug
|
12
|
+
stdall '/tmp/eye-example.log'
|
13
|
+
|
14
|
+
process :some_process do
|
15
|
+
start_command 'sleep 120'
|
16
|
+
daemonize true
|
17
|
+
pid_file '/tmp/sleep.pid'
|
18
|
+
end
|
19
|
+
end
|
data/eye-sentry.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'eye/notify/sentry/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "eye-sentry"
|
8
|
+
spec.version = Eye::Notify::Sentry::VERSION
|
9
|
+
spec.authors = ["Maciej Głowacki"]
|
10
|
+
spec.email = ["bombasarkadian@gmail.com"]
|
11
|
+
spec.summary = %q{Eye to sentry notification}
|
12
|
+
spec.description = %q{Eye to sentry notification}
|
13
|
+
spec.homepage = "https://github.com/bombasarkadian/eye-sentry"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
|
24
|
+
spec.add_runtime_dependency "sentry-raven", "~> 2.7"
|
25
|
+
spec.add_runtime_dependency "eye", "~> 0.10"
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'eye'
|
2
|
+
require 'eye/notify/sentry/version'
|
3
|
+
|
4
|
+
require 'raven/base'
|
5
|
+
|
6
|
+
module Eye
|
7
|
+
class Notify
|
8
|
+
class Sentry < Eye::Notify::Custom
|
9
|
+
# Eye.config do
|
10
|
+
# sentry extra_context: { extra_value: 'foo' }
|
11
|
+
# contact :dev, :sentry, 'http://your-dsn@example.com/project-id'
|
12
|
+
# end
|
13
|
+
|
14
|
+
# not required, empty by default
|
15
|
+
param :extra_context, Hash, false, {}
|
16
|
+
|
17
|
+
def execute
|
18
|
+
Raven.configure { |config| config.dsn = contact }
|
19
|
+
Raven.capture_message(message_subject,
|
20
|
+
level: msg_level,
|
21
|
+
extra: extra_context)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eye-sentry
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Maciej Głowacki
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sentry-raven
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.7'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: eye
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.10'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.10'
|
69
|
+
description: Eye to sentry notification
|
70
|
+
email:
|
71
|
+
- bombasarkadian@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- Gemfile
|
77
|
+
- Gemfile.lock
|
78
|
+
- LICENSE
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- examples/sentry.eye
|
82
|
+
- eye-sentry.gemspec
|
83
|
+
- lib/eye/notify/sentry.rb
|
84
|
+
- lib/eye/notify/sentry/version.rb
|
85
|
+
homepage: https://github.com/bombasarkadian/eye-sentry
|
86
|
+
licenses:
|
87
|
+
- MIT
|
88
|
+
metadata: {}
|
89
|
+
post_install_message:
|
90
|
+
rdoc_options: []
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
requirements: []
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.7.7
|
106
|
+
signing_key:
|
107
|
+
specification_version: 4
|
108
|
+
summary: Eye to sentry notification
|
109
|
+
test_files: []
|