Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Use NewReader for metrics reader init (#195)
Browse files Browse the repository at this point in the history
This must be used for the reader to be initialized properly.

Fixes #170
  • Loading branch information
tchap authored and bogdandrutu committed Sep 3, 2019
1 parent 321e549 commit 0a55998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func newStatsExporter(o Options) (*statsExporter, error) {

func (e *statsExporter) startMetricsReader() error {
e.initReaderOnce.Do(func() {
e.ir, _ = metricexport.NewIntervalReader(&metricexport.Reader{}, e)
e.ir, _ = metricexport.NewIntervalReader(metricexport.NewReader(), e)
})
e.ir.ReportingInterval = e.o.ReportingInterval
return e.ir.Start()
Expand Down

0 comments on commit 0a55998

Please sign in to comment.