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

(cherry picked from commit 9835571)
  • Loading branch information
vjsamuel authored and Carlos Pérez-Aradros Herce committed Apr 2, 2019
1 parent 06d6add commit c63a2fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Collect metrics when EC2 instances are not in running state. {issue}11008[11008] {pull}11023[11023]
- Change ECS field cloud.provider to aws. {pull}11023[11023]
- Add documentation about jolokia autodiscover fields. {issue}10925[10925] {pull}10979[10979]
- Add _bucket to histogram metrics in Prometheus Collector {pull}11578[11578]

*Packetbeat*

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 c63a2fa

Please sign in to comment.