Metric library only accepts array for the namespace.
Open
monitoring
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 63
Description
When you use the metric library directly, the first arguments of any methods like the **gauge** method need to be an explicit array. The metric library is mostly only used in the periodic poller or other internal classes it never face plugin developer.
```ruby
metric.gauge(:jvm, :uptime_in_millis, 123)
service.get_shallow(:jvm, :uptime_in_millis) # fails
metric.gauge([:jvm], :uptime_in_millis, 123)
service.get_shallow(:jvm, :uptime_in_millis) # succeed
```
Code: https://github.com/elastic/logstash/blob/fix/6214/logstash-core/lib/logstash/instrument/metric.rb
This issue was discovered by @suyograo
Contributor guide
Assessment
This issue has not been assessed yet.