Skip to content

Commit

Permalink
Add _bucket to histogram metrics in Prometheus Collector (elastic#11578)
Browse files Browse the repository at this point in the history
* Add _bucket to histogram metrics
  • Loading branch information
vjsamuel authored and exekias committed Apr 2, 2019
1 parent ce68c78 commit 9835571
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d

*Metricbeat*

- Add _bucket to histogram metrics in Prometheus Collector {pull}11578[11578]

*Packetbeat*

- Prevent duplicate packet loss error messages in HTTP events. {pull}10709[10709]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/prometheus/collector/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestGetPromEventsFromMetricFamily(t *testing.T) {
},
{
data: common.MapStr{
"http_request_duration_microseconds": uint64(10),
"http_request_duration_microseconds_bucket": uint64(10),
},
labels: common.MapStr{"le": "0.99"},
},
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/prometheus/collector/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func getPromEventsFromMetricFamily(mf *dto.MetricFamily) []PromEvent {

events = append(events, PromEvent{
data: common.MapStr{
name: bucket.GetCumulativeCount(),
name + "_bucket": bucket.GetCumulativeCount(),
},
labels: bucketLabels,
})
Expand Down

0 comments on commit 9835571

Please sign in to comment.