datadog-notifications 0.5.3 → 0.5.4

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: fad10b73b565812d444474c765e3f8e1054776e7f35205ca0b3e1d81e79413ad
4
- data.tar.gz: db63472562524db432806070e6c6c64f32fbf848eed7fd775761fb7fe0189cbe
3
+ metadata.gz: 3b5f03fc020837e2cfaa38c03d714f072b708c297e769a9320cde3101c7e9f0d
4
+ data.tar.gz: fd49a100718f546dbc09a1fc463e375ebd5a11fdbfd17c99a952094d300af549
5
5
  SHA512:
6
- metadata.gz: 7f872dfd2ea075f5e2562f81ff149a7e5434d603cbda8013d1faf323fa33800543fb48c5ef5434fe40f51b4bf3ef6baa71437dd73947dcf0131a3acd96da0000
7
- data.tar.gz: b650ab31ce04c9383e88b4eda57cfd7d3d907ebd5b62a0e44ae8258b820131fbf721bbc3fd10927299bb328786e0f6580e42c17ff80d9dbb8b0bb356e70bbac5
6
+ metadata.gz: 3f3cf72e5b385ebdf83da7313fa4275996a4db3b65882b686c518d6c35cde0978a030dd283deefdccd71df6dff00952c957496e9eb5a5904f3a5eefc8c009d60
7
+ data.tar.gz: ed7924531864e5cdc77affb11f1241b93bc1d76836784a4222fd036ab5788465c9b26bd458aafb911d12cf5a58bb19da92c58e3a5b8f5180146ff76c57a2eaad
@@ -1,7 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.5.x
5
- - 2.4.x
6
- - 2.3.x
7
- - 2.2.x
4
+ - 2.5.1
5
+ - 2.4.4
6
+ - 2.3.7
7
+ - 2.2.10
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- datadog-notifications (0.5.3)
4
+ datadog-notifications (0.5.4)
5
5
  activesupport
6
6
  dogstatsd-ruby (~> 3.1)
7
7
 
@@ -3,24 +3,24 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'datadog/notifications/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "datadog-notifications"
6
+ s.name = 'datadog-notifications'
7
7
  s.version = Datadog::Notifications::VERSION.dup
8
- s.authors = ["Dimitrij Denissenko"]
9
- s.email = ["dimitrij@blacksquaremedia.com"]
8
+ s.authors = ['Dimitrij Denissenko']
9
+ s.email = ['dimitrij@blacksquaremedia.com']
10
10
  s.description = 'Datadog instrumentation for ActiveSupport::Notifications'
11
11
  s.summary = 'Generic ActiveSupport::Notifications Datadog handler'
12
- s.homepage = "https://github.com/bsm/datadog-notifications"
12
+ s.homepage = 'https://github.com/bsm/datadog-notifications'
13
13
 
14
14
  s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
15
15
  s.test_files = s.files.grep(%r{^(spec)/})
16
- s.require_paths = ["lib"]
16
+ s.require_paths = ['lib']
17
17
 
18
18
  s.add_runtime_dependency('activesupport')
19
- s.add_runtime_dependency('dogstatsd-ruby', "~> 3.1")
19
+ s.add_runtime_dependency('dogstatsd-ruby', '~> 3.1')
20
20
 
21
21
  s.add_development_dependency('activerecord')
22
22
  s.add_development_dependency('bundler')
23
- s.add_development_dependency('grape', ">= 0.16")
23
+ s.add_development_dependency('grape', '>= 0.16')
24
24
  s.add_development_dependency('rack-test')
25
25
  s.add_development_dependency('rake')
26
26
  s.add_development_dependency('rspec')
@@ -7,9 +7,9 @@ module Datadog::Notifications::Plugins
7
7
  # *<tt>:tags</tt> - additional tags
8
8
  #
9
9
  # It expects ActiveSupport instrumented notifications named 'process_action.grpc'.
10
- # Each such notification should have an :action key with gRPC action (method) name.
10
+ # Notification payload should have :service (service name, string) and :action (service action/method name, string) keys.
11
11
  #
12
- # Compatible instrumentation is implemented in grpcx gem: https://github.com/bsm/grpcx
12
+ # Compatible instrumentation is implemented in grpcx gem: https://github.com/bsm/grpcx (>= 0.2.0)
13
13
  def initialize(opts={})
14
14
  super
15
15
  @metric_name = opts[:metric_name] || 'grpc.request'
@@ -23,10 +23,11 @@ module Datadog::Notifications::Plugins
23
23
 
24
24
  def record(reporter, event)
25
25
  payload = event.payload
26
+ service = payload[:service]
26
27
  action = payload[:action]
27
28
  status = payload[:exception] ? 'error' : 'ok'
28
29
 
29
- tags = self.tags + %W[action:#{action} status:#{status}]
30
+ tags = self.tags + %W[service:#{service} action:#{action} status:#{status}]
30
31
 
31
32
  reporter.batch do
32
33
  reporter.increment @metric_name, tags: tags
@@ -1,5 +1,5 @@
1
1
  module Datadog
2
2
  class Notifications
3
- VERSION = '0.5.3'.freeze
3
+ VERSION = '0.5.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog-notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitrij Denissenko