Method
bumpNodeMetric
(counter *prometheus.CounterVec, p *pipeline.Event)
Source from the content-addressed store, hash-verified
| 528 | } |
| 529 | |
| 530 | func (n *Node) bumpNodeMetric(counter *prometheus.CounterVec, p *pipeline.Event) { |
| 531 | // better safe than sorry |
| 532 | acquisType := p.Line.Labels["type"] |
| 533 | if acquisType == "" { |
| 534 | acquisType = "unknown" |
| 535 | } |
| 536 | |
| 537 | labels := prometheus.Labels{ |
| 538 | "source": p.Line.Src, |
| 539 | "type": p.Line.Module, |
| 540 | "name": n.Name, |
| 541 | "stage": p.Stage, |
| 542 | "acquis_type": acquisType, |
| 543 | } |
| 544 | counter.With(labels).Inc() |
| 545 | } |
Tested by
no test coverage detected