elastic / elastic/logstash

Metric library only accepts array for the namespace.

Open
#6,233 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.