newrelic-lotus 0.4.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +19 -0
- data/Rakefile +6 -0
- data/lib/newrelic-lotus/instrument.rb +54 -0
- data/lib/newrelic-lotus/version.rb +5 -0
- data/lib/newrelic-lotus.rb +2 -0
- data/newrelic-lotus.gemspec +23 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 80de110ec71cfab2e299de12fd9c49bfc71dd61c
|
4
|
+
data.tar.gz: fe4bd2ab42920d215859e476b2c7354ee2ca62a5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a0a67b45c5741df413d70429c18b3c28762f4d53b3c7c09b259cc24c5e28f77bfa2002c368ebb5b4ba451555fd8041148396ff7b3a6535ee9b5b761023840257
|
7
|
+
data.tar.gz: 087b57eff42b063e4a4907761ee13704ebc791d5ad6c8f5d642211d2934389195706463981d823f8cdd8b37278c34761dd0854d0e78fe6da70542ceb7d62bc75
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Yuri Artemev
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
### NewRelic Lotus
|
2
|
+
|
3
|
+
---
|
4
|
+
|
5
|
+
[![Travis](https://img.shields.io/travis/artemeff/newrelic-lotus.svg)]() [![Code Climate](https://codeclimate.com/github/artemeff/newrelic-lotus/badges/gpa.svg)](https://codeclimate.com/github/artemeff/newrelic-lotus)
|
6
|
+
|
7
|
+
---
|
8
|
+
|
9
|
+
TODO: add readme
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
### Contributing
|
14
|
+
|
15
|
+
1. Fork it
|
16
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
17
|
+
3. Commit your changes (`git commit -am 'add some feature'`)
|
18
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
19
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'new_relic/agent/instrumentation'
|
2
|
+
require 'new_relic/agent/instrumentation/controller_instrumentation'
|
3
|
+
require 'lotus/controller'
|
4
|
+
|
5
|
+
module NewRelic
|
6
|
+
module Agent
|
7
|
+
module Instrumentation
|
8
|
+
module Lotus
|
9
|
+
include ControllerInstrumentation
|
10
|
+
|
11
|
+
protected
|
12
|
+
|
13
|
+
def finish
|
14
|
+
perform_action_with_newrelic_trace(_trace_options) do
|
15
|
+
super
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def _trace_options
|
22
|
+
{
|
23
|
+
category: :controller,
|
24
|
+
path: "#{request.request_method} #{request.path}",
|
25
|
+
request: request,
|
26
|
+
params: params.to_h
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
DependencyDetection.defer do
|
35
|
+
@name = :lotus
|
36
|
+
|
37
|
+
depends_on do
|
38
|
+
defined?(::Lotus) &&
|
39
|
+
!::NewRelic::Control.instance['disable_lotus'] &&
|
40
|
+
!ENV['DISABLE_NEW_RELIC_LOTUS']
|
41
|
+
end
|
42
|
+
|
43
|
+
executes do
|
44
|
+
NewRelic::Agent.logger.info 'Installing Lotus instrumentation'
|
45
|
+
end
|
46
|
+
|
47
|
+
executes do
|
48
|
+
::Lotus::Controller.configure do
|
49
|
+
prepare do
|
50
|
+
include ::NewRelic::Agent::Instrumentation::Lotus
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'newrelic-lotus/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'newrelic-lotus'
|
7
|
+
spec.version = NewRelic::Lotus::VERSION
|
8
|
+
spec.authors = ['Yuri Artemev']
|
9
|
+
spec.email = ['i@artemeff.com']
|
10
|
+
|
11
|
+
spec.summary = %q{Gem for connecting NewRelic and Lotus}
|
12
|
+
spec.homepage = 'https://github.com/artemeff/newrelic-lotus'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
|
+
spec.require_paths = ['lib']
|
17
|
+
|
18
|
+
spec.add_runtime_dependency 'newrelic_rpm'
|
19
|
+
spec.add_runtime_dependency 'lotus-controller', '~> 0.4.0'
|
20
|
+
|
21
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
22
|
+
spec.add_development_dependency 'rspec'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: newrelic-lotus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0.pre.alpha
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yuri Artemev
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: newrelic_rpm
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: lotus-controller
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.4.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- i@artemeff.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".travis.yml"
|
79
|
+
- Gemfile
|
80
|
+
- LICENSE.txt
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- lib/newrelic-lotus.rb
|
84
|
+
- lib/newrelic-lotus/instrument.rb
|
85
|
+
- lib/newrelic-lotus/version.rb
|
86
|
+
- newrelic-lotus.gemspec
|
87
|
+
homepage: https://github.com/artemeff/newrelic-lotus
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 1.3.1
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.4.5
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: Gem for connecting NewRelic and Lotus
|
111
|
+
test_files: []
|
112
|
+
has_rdoc:
|