-
Notifications
You must be signed in to change notification settings - Fork 1
Remove metric scrape interval #3
Remove metric scrape interval #3
Conversation
collector/collector.go
Outdated
case <-ticker.C: | ||
metricCh := make(chan prometheus.Metric, 5) | ||
go func() { | ||
scrapeResults := []prometheus.Metric{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be e.scrapeResults
?
Otherwise, this doesn't seem to get used anywhere
collector/collector.go
Outdated
if e.config.ScrapeInterval == 0 { // if we are to scrape when the request is made | ||
e.scrape(ch) | ||
} else { | ||
scrapeResults := e.scrapeResults // There is a risk that e.scrapeResults will be replaced while we traverse this look. This should mitigate that risk | ||
for idx := range scrapeResults { | ||
ch <- scrapeResults[idx] | ||
} | ||
} | ||
e.scrape(ch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it so that a scrape will always happen when the metrics endpoints is hit, even if ScrapeInterval is > 0.
Should this still be kept intact?
I do think there should be a mux protecting e.scrapeResults, since there could be concurrent read/writes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True let me take a second pass at this
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/BurntSushi/toml/releases) - [Commits](BurntSushi/toml@v1.2.0...v1.2.1) --- updated-dependencies: - dependency-name: github.com/BurntSushi/toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…eth#272) Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.7.3 to 0.8.2. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.7.3...v0.8.2) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…th#274) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.37.0 to 0.39.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](prometheus/common@v0.37.0...v0.39.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint fix: fix typo fix: fix typo chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint fix: fix typo * chore: savepoint chore: savepoint feat: test gh action pr-cleanup (#2) * feat: test gh action pr-cleanup * chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint * chore: savepoint * chore: savepoint * chore: savepoint * chore: savepoint * chore: savepoint * chore: savepoint * chore: savepoint * feat: do a release 0.4.1 (#3) * chore: savepoint * chore: savepoint * chore: savepoint * feat: do a release 0.4.2 (iamseth#4) * chore: savepoint * chore: savepoint (iamseth#5) * chore: savepoint * chore: savepoint * chore: savepoint * feat: do release 0.4.4 (iamseth#6) * feat: do a release 0.4.4 * chore: savepoint * chore: savepoint * chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint chore: savepoint
* Fix parsing kingpin flags according to exporter-toolkit v0.8.2 Fixes iamseth#275 Signed-off-by: Nikolay Pelov <npelov@gmail.com> * Update README file to reflect the changed options from exporter-toolkit. * Update release version to 0.4.1 --------- Signed-off-by: Nikolay Pelov <npelov@gmail.com>
…h#278) Signed-off-by: Nikolay Pelov <npelov@gmail.com>
* refact: refact PR github action a bit * chore: savepoint * chore: savepoint
* feat(): support scrape multi target rebase branch && update Makefile version * add multi-target explain to readme * docs: correct dns example port of readme --------- Co-authored-by: wccai <wccai@easyops.cn> Co-authored-by: wccai <wccai@easyops>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](golang/net@v0.4.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.39.0 to 0.40.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](prometheus/common@v0.39.0...v0.40.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.40.0 to 0.41.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](prometheus/common@v0.40.0...v0.41.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…eth#294) Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.8.2 to 0.9.0. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.8.2...v0.9.0) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…eth#295) Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.9.0...v0.9.1) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.41.0 to 0.42.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](prometheus/common@v0.41.0...v0.42.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update packages versions + clean up * Use Oracle image to retrieve binaries * Use FQN for docker image
Some oracledb tables return names with % and -
…acledb-integration-scheduled-only-in-main
Pull Request informationFollowing release(s) have been created for this PR.
|
It makes little sense to have this functionality across the package and the invoker in main should just be the one that spins up the goroutine.
This also simplifies the shared config object.