Skip to content

Commit

Permalink
prefix datapoints in scheduler.CollectDatapoints (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
charless-splunk authored Sep 5, 2019
1 parent 6359a78 commit 56facc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sfxclient/sfxclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ func (s *Scheduler) Var() expvar.Var {
func (s *Scheduler) CollectDatapoints() []*datapoint.Datapoint {
s.callbackMutex.Lock()
defer s.callbackMutex.Unlock()
return s.collectDatapoints()
datapoints := s.collectDatapoints()
s.prependPrefix(datapoints)
return datapoints
}

// collectDatapoints gives a scheduler an external endpoint to be called and is not thread safe
Expand Down

0 comments on commit 56facc7

Please sign in to comment.