funktor 0.7.26 → 0.7.29
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 +36 -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: dc2b8fd9bad2bcfa73c2eb5f7db5da733cb3abaa9fa9fb1d3903d895b8c43c8e
|
4
|
+
data.tar.gz: 782afbe2de67f9fbe35e1a68fae7bf9fa80edd342af1c08cde4ce87535c152a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c985f55a5fe9fd70a7572ae40f45536180f3ab08740a529c5df2cbf0627d5aae12e7a190ee6bfcc5aadedee2b1667d9b986aa85f915e22eda421a314d853159a
|
7
|
+
data.tar.gz: e2d62a4d78348a957e7cb296526fd4010632a96a47aa8874fe84f14093d73dd450c80c9ef3b04519d4f75f7c4db0c435dd26008c3bff7fa9cb26976e16273bfe
|
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.29)
|
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,36 @@
|
|
1
|
+
require 'new_relic/agent'
|
2
|
+
module Funktor
|
3
|
+
module Middleware
|
4
|
+
class NewRelic
|
5
|
+
include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
|
6
|
+
|
7
|
+
def call(job)
|
8
|
+
::NewRelic::Agent.manual_start(:sync_startup => true)
|
9
|
+
trace_args = {
|
10
|
+
:name => 'perform',
|
11
|
+
:class_name => job.worker_class_name_for_metrics,
|
12
|
+
:category => 'OtherTransaction/Funktor'
|
13
|
+
}
|
14
|
+
perform_action_with_newrelic_trace(trace_args) do
|
15
|
+
::NewRelic::Agent::Transaction.merge_untrusted_agent_attributes(job.worker_params,
|
16
|
+
:'worker.funktor.params',
|
17
|
+
::NewRelic::Agent::AttributeFilter::DST_NONE)
|
18
|
+
yield
|
19
|
+
end
|
20
|
+
::NewRelic::Agent.shutdown
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.new_relic!
|
26
|
+
Funktor.configure_work_queue_handler do |config|
|
27
|
+
config.work_queue_handler_middleware do |chain|
|
28
|
+
chain.add Funktor::Middleware::NewRelic
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
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.29
|
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
|