dogstatsd-ruby 4.8.2 → 4.8.3

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: dca98cecf21fceb3e5a4c4e76ceb8be8ffa2032ad317d63d1b3df7817dd60ef7
4
- data.tar.gz: 0ef534d77693c3f1efbd8e8c8e1399f54ee6664e1044a16c913e4f9fa302e3d7
3
+ metadata.gz: dc2f6d365efc8cf25456fb9dbd5ad526abe0ec61f2b63e9b79346c767aa3a3b0
4
+ data.tar.gz: 84a029741390b63cf0540de60a872c6b0820bf6ad4c1619cea120d71bc38c3bc
5
5
  SHA512:
6
- metadata.gz: d95681cd4c29de465efb5f6429227716d5cf4c6d1c57d1d5f6ba06cae2297b6ac06a961763a800b7997e6bf0011fa6f922826fdea7842fde536943c151c8e050
7
- data.tar.gz: 0b560868db6815d18283ae938536c234d169e5aba4e1d602ee97759b36ad19fab626297b56cecf07b426c14de211e4bab43a010474e51a347387f82cd0c9cabe
6
+ metadata.gz: 769645a11d455fceb1b0c4d7d718005d869c62546cd1c255f0a45b9da51a300500dfe2c1a4e601248f1e8ef6ce1e40c15ebaca55d6e55092babef1c153ccdcf0
7
+ data.tar.gz: 1429d390a2c52758f957dd4766cf30db5039986527982f3188fcc44d7c058431d9f85180b1af7e5dae8f82db31325115b0ea4efb1fced82d7585924b0702fd0c
@@ -290,6 +290,7 @@ module Datadog
290
290
  # @option opts [String, nil] :priority ('normal') Can be "normal" or "low"
291
291
  # @option opts [String, nil] :source_type_name (nil) Assign a source type to the event
292
292
  # @option opts [String, nil] :alert_type ('info') Can be "error", "warning", "info" or "success".
293
+ # @option opts [Boolean, false] :truncate_if_too_long (false) Truncate the event if it is too long
293
294
  # @option opts [Array<String>] :tags tags to be added to every metric
294
295
  # @example Report an awful event:
295
296
  # $statsd.event('Something terrible happened', 'The end is near if we do nothing', :alert_type=>'warning', :tags=>['end_of_times','urgent'])
@@ -48,7 +48,11 @@ module Datadog
48
48
  end
49
49
 
50
50
  if event.bytesize > MAX_EVENT_SIZE
51
- raise "Event #{title} payload is too big (more that 8KB), event discarded"
51
+ if options[:truncate_if_too_long]
52
+ event.slice!(MAX_EVENT_SIZE..event.length)
53
+ else
54
+ raise "Event #{title} payload is too big (more that 8KB), event discarded"
55
+ end
52
56
  end
53
57
  end
54
58
  end
@@ -4,6 +4,6 @@ require_relative 'connection'
4
4
 
5
5
  module Datadog
6
6
  class Statsd
7
- VERSION = '4.8.2'
7
+ VERSION = '4.8.3'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogstatsd-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.2
4
+ version: 4.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rein Henrichs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-16 00:00:00.000000000 Z
11
+ date: 2021-02-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby DogStastd client
14
14
  email: code@datadoghq.com
@@ -38,9 +38,9 @@ licenses:
38
38
  - MIT
39
39
  metadata:
40
40
  bug_tracker_uri: https://github.com/DataDog/dogstatsd-ruby/issues
41
- changelog_uri: https://github.com/DataDog/dogstatsd-ruby/blob/v4.8.2/CHANGELOG.md
42
- documentation_uri: https://www.rubydoc.info/gems/dogstatsd-ruby/4.8.2
43
- source_code_uri: https://github.com/DataDog/dogstatsd-ruby/tree/v4.8.2
41
+ changelog_uri: https://github.com/DataDog/dogstatsd-ruby/blob/v4.8.3/CHANGELOG.md
42
+ documentation_uri: https://www.rubydoc.info/gems/dogstatsd-ruby/4.8.3
43
+ source_code_uri: https://github.com/DataDog/dogstatsd-ruby/tree/v4.8.3
44
44
  post_install_message:
45
45
  rdoc_options: []
46
46
  require_paths: