funktor 0.7.26 → 0.7.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +4 -2
- data/lib/funktor/middleware/new_relic.rb +34 -0
- data/lib/funktor/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7feda36c3d7a6609b907b94632602d744b98a2f685853eb4686f77aa62330b
|
4
|
+
data.tar.gz: 6ceaf132ea54f0e97760a05660208e262d7ed9c1d0473522100b5bf5c3d39161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee21aa7210894ad2a05554d73eaa0958100ac87956e8e70e85146e0e04e419e402afc905f9eb20ba488537be053882739deb8595842cb50953594617e5f2dfc
|
7
|
+
data.tar.gz: 9dbbed69db716f99cf8bd16db47938a45036b16d88bd5c576f862c3b2dd9457a589b15697829f95ed669d801d5e58bac856a4406c980d94157fd8a627bd88c2e
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
funktor (0.7.
|
4
|
+
funktor (0.7.27)
|
5
5
|
activesupport
|
6
6
|
aws-sdk-dynamodb (~> 1.62)
|
7
7
|
aws-sdk-sqs (~> 1.37)
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
addressable (2.8.0)
|
23
23
|
public_suffix (>= 2.0.2, < 5.0)
|
24
24
|
aws-eventstream (1.2.0)
|
25
|
-
aws-partitions (1.
|
25
|
+
aws-partitions (1.597.0)
|
26
26
|
aws-sdk-core (3.131.1)
|
27
27
|
aws-eventstream (~> 1, >= 1.0.2)
|
28
28
|
aws-partitions (~> 1, >= 1.525.0)
|
@@ -53,6 +53,7 @@ GEM
|
|
53
53
|
minitest (5.14.4)
|
54
54
|
mustermann (1.1.1)
|
55
55
|
ruby2_keywords (~> 0.0.1)
|
56
|
+
newrelic_rpm (8.8.0)
|
56
57
|
pry (0.13.1)
|
57
58
|
coderay (~> 1.1)
|
58
59
|
method_source (~> 1.0)
|
@@ -107,6 +108,7 @@ PLATFORMS
|
|
107
108
|
DEPENDENCIES
|
108
109
|
activejob (>= 5.1.5)
|
109
110
|
funktor!
|
111
|
+
newrelic_rpm
|
110
112
|
pry-byebug
|
111
113
|
rake (~> 12.0)
|
112
114
|
rspec (~> 3.0)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'newrelic_rpm'
|
2
|
+
module Funktor
|
3
|
+
module Middleware
|
4
|
+
class NewRelic
|
5
|
+
include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
|
6
|
+
|
7
|
+
def call(job)
|
8
|
+
trace_args = {
|
9
|
+
:name => 'perform',
|
10
|
+
:class_name => job.worker_class_name_for_metrics,
|
11
|
+
:category => 'OtherTransaction/Funktor'
|
12
|
+
}
|
13
|
+
perform_action_with_newrelic_trace(trace_args) do
|
14
|
+
::NewRelic::Agent::Transaction.merge_untrusted_agent_attributes(job.worker_params,
|
15
|
+
:'worker.funktor.params',
|
16
|
+
::NewRelic::Agent::AttributeFilter::DST_NONE)
|
17
|
+
yield
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def new_relic!
|
24
|
+
Funktor.configure_work_queue_handler do |config|
|
25
|
+
config.work_queue_handler_middleware do |chain|
|
26
|
+
chain.add Funktor::Middleware::NewRelic
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
data/lib/funktor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: funktor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Green
|
@@ -261,6 +261,7 @@ files:
|
|
261
261
|
- lib/funktor/job_pusher.rb
|
262
262
|
- lib/funktor/logger.rb
|
263
263
|
- lib/funktor/middleware/metrics.rb
|
264
|
+
- lib/funktor/middleware/new_relic.rb
|
264
265
|
- lib/funktor/middleware_chain.rb
|
265
266
|
- lib/funktor/rails.rb
|
266
267
|
- lib/funktor/shard_utils.rb
|