dogstatsd-ruby 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c77f82b5b9a858517a937a5b2db1a1f890a80c94ca63e60f12e256ab28f7192d
|
4
|
+
data.tar.gz: e95ee401174c084edb117068f73d1c72f08e602ea9b51363e57e53c176072472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d54866c8693d2dab18a1370d6ba5951a42ec4ed62615c6194548dd5faa109731840187e2a7ddaf591f08d07064c8e173df74728f182fe5cb5593c896503e19
|
7
|
+
data.tar.gz: d8021d0b6b21efe7ab14841665b01819c397d4419b247615d88b7685b332b1c8bb9a13d05fc22d21baf5d709d5452f9a9a3d932438addfbf1238e8ab5656a8e5
|
data/lib/datadog/statsd.rb
CHANGED
@@ -299,6 +299,26 @@ module Datadog
|
|
299
299
|
forwarder.send_message(serializer.to_event(title, text, opts))
|
300
300
|
end
|
301
301
|
|
302
|
+
# Send several metrics in the same packet.
|
303
|
+
# They will be buffered and flushed when the block finishes.
|
304
|
+
#
|
305
|
+
# This method exists for compatibility with v4.x versions, it is not needed
|
306
|
+
# anymore since the batching is now automatically done internally.
|
307
|
+
# It also means that an automatic flush could occur if the buffer is filled
|
308
|
+
# during the execution of the batch block.
|
309
|
+
#
|
310
|
+
# This method is DEPRECATED and will be removed in future v6.x API.
|
311
|
+
#
|
312
|
+
# @example Send several metrics in one packet:
|
313
|
+
# $statsd.batch do |s|
|
314
|
+
# s.gauge('users.online',156)
|
315
|
+
# s.increment('page.views')
|
316
|
+
# end
|
317
|
+
def batch
|
318
|
+
yield self
|
319
|
+
flush(sync: true)
|
320
|
+
end
|
321
|
+
|
302
322
|
# Close the underlying socket
|
303
323
|
def close
|
304
324
|
forwarder.close
|
@@ -45,12 +45,18 @@ module Datadog
|
|
45
45
|
|
46
46
|
if CLOSEABLE_QUEUES
|
47
47
|
def stop(join_worker: true)
|
48
|
+
message_queue = @message_queue
|
48
49
|
message_queue.close if message_queue
|
50
|
+
|
51
|
+
sender_thread = @sender_thread
|
49
52
|
sender_thread.join if sender_thread && join_worker
|
50
53
|
end
|
51
54
|
else
|
52
55
|
def stop(join_worker: true)
|
56
|
+
message_queue = @message_queue
|
53
57
|
message_queue << :close if message_queue
|
58
|
+
|
59
|
+
sender_thread = @sender_thread
|
54
60
|
sender_thread.join if sender_thread && join_worker
|
55
61
|
end
|
56
62
|
end
|
@@ -13,7 +13,11 @@ module Datadog
|
|
13
13
|
|
14
14
|
# Convert to tag list and set
|
15
15
|
@global_tags = to_tags_list(global_tags)
|
16
|
-
|
16
|
+
if @global_tags.any?
|
17
|
+
@global_tags_formatted = @global_tags.join(',')
|
18
|
+
else
|
19
|
+
@global_tags_formatted = nil
|
20
|
+
end
|
17
21
|
end
|
18
22
|
|
19
23
|
def format(message_tags)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogstatsd-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rein Henrichs
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-04-
|
12
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Ruby DogStatsd client
|
15
15
|
email: code@datadoghq.com
|
@@ -41,9 +41,9 @@ licenses:
|
|
41
41
|
- MIT
|
42
42
|
metadata:
|
43
43
|
bug_tracker_uri: https://github.com/DataDog/dogstatsd-ruby/issues
|
44
|
-
changelog_uri: https://github.com/DataDog/dogstatsd-ruby/blob/v5.0.
|
45
|
-
documentation_uri: https://www.rubydoc.info/gems/dogstatsd-ruby/5.0.
|
46
|
-
source_code_uri: https://github.com/DataDog/dogstatsd-ruby/tree/v5.0.
|
44
|
+
changelog_uri: https://github.com/DataDog/dogstatsd-ruby/blob/v5.0.1/CHANGELOG.md
|
45
|
+
documentation_uri: https://www.rubydoc.info/gems/dogstatsd-ruby/5.0.1
|
46
|
+
source_code_uri: https://github.com/DataDog/dogstatsd-ruby/tree/v5.0.1
|
47
47
|
post_install_message:
|
48
48
|
rdoc_options: []
|
49
49
|
require_paths:
|