elastic / elastic/logstash

Optionally expose the type of metric via the Metrics API.

Open
#7,645 0 comments 0 reactions 0 assignees View on GitHub
discuss metrics
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

As more metrics are exposed we should allow for an optional flag to expose the underlying type to caller. Perhaps ```?type=true```.

This may allow the consumer of the metrics to make a more informed choice about what to do with these metrics.

For example:
```
"pipelines" : {
"main" : {
"events" : {
"duration_in_millis" : 59,
```
Could optionally be:
```
"pipelines" : {
"main" : {
"events" : {
"duration_in_millis" : {
"type" : "counter/long",
"value" : 59
},
```
In the above example, it is a counter backed by a long.

Other types may be ```gauge/text``` or ```gauge/numeric``` or ```gauge/boolean``` (or future) ```rate/long```.

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.