Skip to content

Commit

Permalink
chore(inputs.prometheus): Improve label and field selector logging (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DStrand1 authored Dec 9, 2024
1 parent 14eb97a commit e713360
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/inputs/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ func (p *Prometheus) Init() error {
return fmt.Errorf("the field selector %q is not supported for pods", invalidSelector)
}

p.Log.Infof("Using the label selector: %v and field selector: %v", p.podLabelSelector, p.podFieldSelector)
if p.KubernetesLabelSelector != "" {
p.Log.Debugf("Using the label selector: %v", p.podLabelSelector)
}
if p.KubernetesFieldSelector != "" {
p.Log.Debugf("Using the field selector: %v", p.podFieldSelector)
}

for k, vs := range p.NamespaceAnnotationPass {
tagFilter := models.TagFilter{}
Expand Down

0 comments on commit e713360

Please sign in to comment.