Collector for working with data from the system profile #39
Annotations
7 errors
Lint Check:
exporter/profile_status_collector.go#L68
[golangci-lint] reported by reviewdog 🐶
Error return value of `errors.Wrap` is not checked (errcheck)
Raw Output:
exporter/profile_status_collector.go:68:14: Error return value of `errors.Wrap` is not checked (errcheck)
errors.Wrap(err, "cannot get the database names list")
^
|
Lint Check:
exporter/profile_status_collector.go#L82
[golangci-lint] reported by reviewdog 🐶
Error return value of `errors.Wrapf` is not checked (errcheck)
Raw Output:
exporter/profile_status_collector.go:82:16: Error return value of `errors.Wrapf` is not checked (errcheck)
errors.Wrapf(err, "cannot read system.profile")
^
|
Lint Check:
main.go#L56
[golangci-lint] reported by reviewdog 🐶
tag is not aligned, should be: help:"Enable collecting metrics from profile" name:"collector.profile" (tagalign)
Raw Output:
main.go:56:32: tag is not aligned, should be: help:"Enable collecting metrics from profile" name:"collector.profile" (tagalign)
EnableProfile bool `name:"collector.profile" help:"Enable collecting metrics from profile"`
^
|
Lint Check:
main.go#L64
[golangci-lint] reported by reviewdog 🐶
tag is not aligned , should be: default:"30" help:"Set time for scrape slow queries." name:"collector.profile-time-ts" (tagalign)
Raw Output:
main.go:64:20: tag is not aligned , should be: default:"30" help:"Set time for scrape slow queries." name:"collector.profile-time-ts" (tagalign)
ProfileTimeTS int `name:"collector.profile-time-ts" help:"Set time for scrape slow queries." default:"30"`
^
|
Lint Check:
exporter/profile_status_collector.go#L73
[golangci-lint] reported by reviewdog 🐶
unnecessary conversion (unconvert)
Raw Output:
exporter/profile_status_collector.go:73:67: unnecessary conversion (unconvert)
ts := primitive.NewDateTimeFromTime(time.Now().Add(-time.Duration(time.Second * time.Duration(timeScrape))))
^
|
Lint Check:
exporter/profile_status_collector.go#L83
[golangci-lint] reported by reviewdog 🐶
break with no blank line before (nlreturn)
Raw Output:
exporter/profile_status_collector.go:83:4: break with no blank line before (nlreturn)
break
^
|
Lint Check:
exporter/profile_status_collector_test.go#L32
[golangci-lint] reported by reviewdog 🐶
Function TestProfileCollector missing the call to method parallel (paralleltest)
Raw Output:
exporter/profile_status_collector_test.go:32:1: Function TestProfileCollector missing the call to method parallel (paralleltest)
func TestProfileCollector(t *testing.T) {
^
|