Skip to content

Commit

Permalink
fix null value parsing
Browse files Browse the repository at this point in the history
metrics will not be published anymore if they are ull

Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
  • Loading branch information
mblaschke committed Aug 30, 2021
1 parent dd65e5e commit abcb2ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/prometheus/client_golang v1.11.0
github.com/remeh/sizedwaitgroup v1.0.0
github.com/sirupsen/logrus v1.8.1
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210828132045-eb367b3180dc
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210830185910-36bc29b34b66
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210828132045-eb367b3180dc h1:/CsGASswNlj8jGYuwkxRCTCaiX3QVGXvebvjxN5A6eI=
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210828132045-eb367b3180dc/go.mod h1:+O/vB3cTYLvYmBI1R0dO4VHbsrXAn3HopLiJBvJIUx8=
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210830185910-36bc29b34b66 h1:ehYAmLktbEIKVoJ7ZbONNUDO0boPmgriB5dNO18bG4w=
github.com/webdevops/azure-resourcegraph-exporter v0.0.0-20210830185910-36bc29b34b66/go.mod h1:+O/vB3cTYLvYmBI1R0dO4VHbsrXAn3HopLiJBvJIUx8=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
4 changes: 3 additions & 1 deletion loganalytics/prober.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ func (p *LogAnalyticsProber) Run() {
}
}

gaugeVec.With(metric.Labels).Set(metric.Value)
if metric.Value != nil {
gaugeVec.With(metric.Labels).Set(*metric.Value)
}
}
}
p.logger.WithField("duration", time.Since(requestTime).String()).Debug("finished request")
Expand Down

0 comments on commit abcb2ea

Please sign in to comment.