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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe7973cd6c5d59ac83b10c4726244665bd0584f7abad03ccb89a49f6e20daf3b
4
- data.tar.gz: ea2f3d112ff0565b1d21a72fb8398f7f776eca2f28368d0c1d397cdd24a50090
3
+ metadata.gz: ef7feda36c3d7a6609b907b94632602d744b98a2f685853eb4686f77aa62330b
4
+ data.tar.gz: 6ceaf132ea54f0e97760a05660208e262d7ed9c1d0473522100b5bf5c3d39161
5
5
  SHA512:
6
- metadata.gz: 5daf5129ffd987d9370a31405655c5940ab4eb0a0d2eb3fdb5d53fdb7794c8b5723999d359b3bc5cf56738ea89c027f7fffb84f1d68f49d0c1383a9d47f0b217
7
- data.tar.gz: 9151e301390aa929b0de57aa3c8c909c3d858315528f121077e8ff4e99427a6de7f4904be66ba777b5c16e032d496f6e42e19a3d711f8d2ea259c245872e4bd9
6
+ metadata.gz: 5ee21aa7210894ad2a05554d73eaa0958100ac87956e8e70e85146e0e04e419e402afc905f9eb20ba488537be053882739deb8595842cb50953594617e5f2dfc
7
+ data.tar.gz: 9dbbed69db716f99cf8bd16db47938a45036b16d88bd5c576f862c3b2dd9457a589b15697829f95ed669d801d5e58bac856a4406c980d94157fd8a627bd88c2e
data/Gemfile CHANGED
@@ -5,3 +5,5 @@ gemspec
5
5
 
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.0"
8
+
9
+ gem 'newrelic_rpm'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- funktor (0.7.26)
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.596.0)
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
+
@@ -1,3 +1,3 @@
1
1
  module Funktor
2
- VERSION = "0.7.26"
2
+ VERSION = "0.7.27"
3
3
  end
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.26
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