File tree Expand file tree Collapse file tree
metricbeat/module/prometheus Expand file tree Collapse file tree Original file line number Diff line number Diff 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
7373type PromEventsGeneratorFactory func (ms mb.BaseMetricSet ) (PromEventsGenerator , error )
7474
7575// MetricSet for fetching prometheus data
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ type promEventGenerator struct{}
4949func (p * promEventGenerator ) Start () {}
5050func (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.
5454func (p * promEventGenerator ) GeneratePromEvents (mf * dto.MetricFamily ) []PromEvent {
5555 var events []PromEvent
Original file line number Diff line number Diff 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// {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments