While upgrading a pliny app to 3.1.2, we saw invalid argument errors when trying to use the metrics. This was due to the fact that the in ruby 3, the *names grabs the **options. This difference causes a metric explosion as hashes with values are sent in as their own metric.
This ruby code shows the issue if you run this in 2.7.4 and 3.1.2:
def foo(*names, **opts, &block)
puts "names: #{names.inspect}"
puts "opts: #{opts.inspect}"
puts "block: #{block}"
end
foo("foo", {bar: :baz}) do
puts "block"
end
While upgrading a pliny app to 3.1.2, we saw invalid argument errors when trying to use the metrics. This was due to the fact that the in ruby 3, the
*names
grabs the**options
. This difference causes a metric explosion as hashes with values are sent in as their own metric.This ruby code shows the issue if you run this in 2.7.4 and 3.1.2: