Skip to content

Commit

Permalink
Fix the irregular and typo on prometheus module. (#25726)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoothzj authored Jun 24, 2021
1 parent 4aff295 commit 4c43996
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions metricbeat/module/prometheus/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ type PromEventsGenerator interface {
// Start must be called before using the generator
Start()

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

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

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

// MetricSet for fetching prometheus data
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 @@ -49,7 +49,7 @@ type promEventGenerator struct{}
func (p *promEventGenerator) Start() {}
func (p *promEventGenerator) Stop() {}

// DefaultPromEventsGenerator stores all Prometheus metrics using
// GeneratePromEvents DefaultPromEventsGenerator stores all Prometheus metrics using
// only double field type in Elasticsearch.
func (p *promEventGenerator) GeneratePromEvents(mf *dto.MetricFamily) []PromEvent {
var events []PromEvent
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/prometheus/query/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type instantVectorResult struct {
Vector []interface{} `json:"value"`
}

// InstantVectorResponse is for "vector" type from Prometheus Query API Request
// RangeVectorResponse is for "vector" type from Prometheus Query API Request
// rangeVectorResult format:
// [
// {
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/prometheus/remote_write/remote_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type RemoteWriteEventsGenerator interface {
// Start must be called before using the generator
Start()

// converts Prometheus Samples to a map of mb.Event
// GenerateEvents converts Prometheus Samples to a map of mb.Event
GenerateEvents(metrics model.Samples) map[string]mb.Event

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

0 comments on commit 4c43996

Please sign in to comment.