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

Remove metric scrape interval #3

Merged
merged 28 commits into from
Apr 14, 2023

Conversation

schmikei
Copy link

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.

case <-ticker.C:
metricCh := make(chan prometheus.Metric, 5)
go func() {
scrapeResults := []prometheus.Metric{}

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

Comment on lines 170 to 167
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)

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.

Copy link
Author

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

vutkin and others added 25 commits January 31, 2023 22:56
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>
* 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 -
@github-actions
Copy link

github-actions bot commented Apr 12, 2023

Pull Request information

Following release(s) have been created for this PR.

Time Release
2023-04-12 18:04:42 0.4.4-rc.pr-3-1
2023-04-13 16:07:59 0.4.4-rc.pr-3-2
2023-04-14 16:16:59 0.4.4-rc.pr-3-3

@kuiperda kuiperda self-requested a review April 14, 2023 18:31
@schmikei schmikei merged commit 74cb2dc into master Apr 14, 2023
@schmikei schmikei deleted the oracledb-integration-scheduled-only-in-main branch April 14, 2023 18:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants