Capturing "metrics" with string-values
- Dominant language
- Gherkin
- Stars
- 427
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
## Description of the issue
Currently, Java agent captures numeric values exposed through JMX MBeans and report those to apm-server as metrics.
It is also possible (and quite common) to expose values as a string through JMX. For example, a cache server might have a internal state "OK", "WARMING", "READY" and monitoring a cluster of those imply being able to properly monitor those values.
Current protocol only supports numeric values: https://github.com/elastic/apm-server/blob/6ba318f5ed3326bc7ade33b94bcaa8cdb07e636a/docs/spec/metricsets/sample.json#L7
- related [discussion on discuss](https://discuss.elastic.co/t/how-to-capture-jolokia-output-on-to-apm-server/238763).
- similar [issue on micrometer](https://github.com/micrometer-metrics/micrometer/issues/1033) (does not support this)
There might be a few options to implement this
- reuse existing metrics format, and report a fixed value of 1 with a dynamic label.
- add "stringValue" to metrics protocol to allow proper reporting (cleaner, but more impacts, including on apm-server).
## What we are voting on
- does this feature would be relevant to your agent/platform or is it too Java-specific ?
## Vote
| Agent | Yes | No | Indifferent | N/A | Link to agent issue
| --------|:----:|:---:|:-----------:|:----:|:-------------------:|
| .NET |
- [ ]
- [ ]
- [ ]
- [ ]
| Go |
- [ ]
- [x]
- [ ]
- [ ]
| Java |
- [x]
- [ ]
- [ ]
- [ ]
| Node.js |
- [ ]
- [ ]
- [ ]
- [ ]
| PHP |
- [ ]
- [ ]
- [ ]
- [ ]
| Python |
- [ ]
- [ ]
- [x]
- [ ]
| Ruby |
- [ ]
- [ ]
- [x]
- [ ]
| RUM |
- [ ]
- [ ]
- [ ]
- [ ]
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.