Skip to content

Commit

Permalink
Don't export timeSeries if there are no records in cps (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlaycock committed May 25, 2021
1 parent 5a6256f commit 04c8099
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exporter/metric/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ func (me *metricExporter) exportTimeSeries(ctx context.Context, cps export.Check
return nil
})

if len(tss) == 0 {
return nil
}

if aggError != nil {
if me.o.onError != nil {
me.o.onError(aggError)
Expand Down

0 comments on commit 04c8099

Please sign in to comment.