Closed lzap closed 2 years ago
Probably not an issue with the current version, closing. Cheers!
diff --git a/test/dogstatsd_datagram_builder_test.rb b/test/dogstatsd_datagram_builder_test.rb
index 181bb05..48e0287 100644
--- a/test/dogstatsd_datagram_builder_test.rb
+++ b/test/dogstatsd_datagram_builder_test.rb
@@ -20,6 +20,16 @@ class DogStatsDDatagramBuilderTest < Minitest::Test
assert_equal(0, parsed_datagram.value)
end
+ def test_simple_service_check_empty_array_tags
+ datagram = @datagram_builder._sc("service", :ok, tags: [])
+ assert_equal("_sc|service|0", datagram)
+ end
+
+ def test_simple_service_check_empty_hash_tags
+ datagram = @datagram_builder._sc("service", :ok, tags: {})
+ assert_equal("_sc|service|0", datagram)
+ end
+
def test_complex_service_check
datagram = @datagram_builder._sc("service", :warning, timestamp: Time.parse("2019-09-30T04:22:12Z"),
hostname: "localhost", tags: { foo: "bar|baz" }, message: "blah")
Hey,
we are on an older version of the library and we noticed that the library sends this when there are no labels:
Is this expected or a bug? Thanks for help!
Edit: It only happens when I pass
tags: []
.