Skip to content

Commit

Permalink
feat: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss committed Nov 7, 2023
1 parent 420b89b commit c2b7c48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions cmd/poller/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ func New(c, n string, o *options.Options, p conf.Exporter, params *conf.Poller)
labels := params.Labels
if labels != nil {
for _, labelPtr := range *labels {
for key, value := range labelPtr {
abc.Metadata.SetGlobalLabel(key, value)
}
abc.Metadata.SetGlobalLabels(labelPtr)
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions cmd/poller/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,10 +934,8 @@ func (p *Poller) loadMetadata() {
labels := p.params.Labels
if labels != nil {
for _, labelPtr := range *labels {
for key, value := range labelPtr {
p.metadata.SetGlobalLabel(key, value)
p.status.SetGlobalLabel(key, value)
}
p.metadata.SetGlobalLabels(labelPtr)
p.status.SetGlobalLabels(labelPtr)
}
}
p.status.SetExportOptions(matrix.DefaultExportOptions())
Expand Down

0 comments on commit c2b7c48

Please sign in to comment.