Skip to content

Commit e57f898

Browse files
author
shoothzj
committed
Fix the irregular and typo on prometheus module.
1 parent c1a3a8d commit e57f898

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

metricbeat/module/prometheus/collector/collector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ type PromEventsGenerator interface {
6262
// Start must be called before using the generator
6363
Start()
6464

65-
// converts a Prometheus metric family into a list of PromEvents
65+
// GeneratePromEvents converts a Prometheus metric family into a list of PromEvents
6666
GeneratePromEvents(mf *dto.MetricFamily) []PromEvent
6767

6868
// Stop must be called when the generator won't be used anymore
6969
Stop()
7070
}
7171

72-
// PromEventsGeneratorFactory creates a PromEventsGenerator when instanciating a metricset
72+
// PromEventsGeneratorFactory creates a PromEventsGenerator when instantiating a MetricSet
7373
type PromEventsGeneratorFactory func(ms mb.BaseMetricSet) (PromEventsGenerator, error)
7474

7575
// MetricSet for fetching prometheus data

metricbeat/module/prometheus/collector/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type promEventGenerator struct{}
4949
func (p *promEventGenerator) Start() {}
5050
func (p *promEventGenerator) Stop() {}
5151

52-
// DefaultPromEventsGenerator stores all Prometheus metrics using
52+
// GeneratePromEvents DefaultPromEventsGenerator stores all Prometheus metrics using
5353
// only double field type in Elasticsearch.
5454
func (p *promEventGenerator) GeneratePromEvents(mf *dto.MetricFamily) []PromEvent {
5555
var events []PromEvent

metricbeat/module/prometheus/query/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type instantVectorResult struct {
6969
Vector []interface{} `json:"value"`
7070
}
7171

72-
// InstantVectorResponse is for "vector" type from Prometheus Query API Request
72+
// RangeVectorResponse is for "vector" type from Prometheus Query API Request
7373
// rangeVectorResult format:
7474
// [
7575
// {

metricbeat/module/prometheus/remote_write/remote_write.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type RemoteWriteEventsGenerator interface {
4444
// Start must be called before using the generator
4545
Start()
4646

47-
// converts Prometheus Samples to a map of mb.Event
47+
// GenerateEvents converts Prometheus Samples to a map of mb.Event
4848
GenerateEvents(metrics model.Samples) map[string]mb.Event
4949

5050
// Stop must be called when the generator won't be used anymore

0 commit comments

Comments
 (0)