Skip to content

fix: Sync Metrics for Long running plugins#455

Merged
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
bbernays:reset-metrics
Dec 5, 2022
Merged

fix: Sync Metrics for Long running plugins#455
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
bbernays:reset-metrics

Conversation

@bbernays
Copy link
Copy Markdown
Contributor

@bbernays bbernays commented Dec 1, 2022

Summary

Prior to this change resource, error, and panic count were only reset when a plugin was relaunched. This means if a plugin is being run via direct gRPC calls then the summary was a total of all of the runs.

This PR reinitializes the metrics for each sync


Use the following steps to ensure your PR is ready to be reviewed

  • Read the contribution guidelines 🧑‍🎓
  • Run go fmt to format your code 🖊
  • Lint your changes via golangci-lint run 🚨 (install golangci-lint here)
  • Update or add tests 🧪
  • Ensure the status checks below are successful ✅

@bbernays bbernays requested a review from yevgenypats as a code owner December 1, 2022 22:38
@github-actions github-actions bot added the fix label Dec 1, 2022
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 1, 2022

⏱️ Benchmark results

Comparing with 2deced1

  • DefaultConcurrency-2 resources/s: 11,699 ⬆️ 1.21% increase vs. 2deced1
  • Glob-2 ns/op: 157.6 ⬇️ 31.54% decrease vs. 2deced1
  • TablesWithChildrenDefaultConcurrency-2 resources/s: 31,145 ⬆️ 10.22% increase vs. 2deced1
  • BufferedScanner-2 ns/op: 9.378 ⬇️ 43.85% decrease vs. 2deced1
  • LogReader-2 ns/op: 30.83 ⬇️ 31.56% decrease vs. 2deced1

@kodiakhq kodiakhq bot merged commit 3fecc61 into cloudquery:main Dec 5, 2022
@bbernays bbernays deleted the reset-metrics branch December 5, 2022 15:57
kodiakhq bot pushed a commit that referenced this pull request Dec 6, 2022
🤖 I have created a release *beep* *boop*
---


## [1.11.0](v1.10.0...v1.11.0) (2022-12-05)


### Features

* Add Support for net.IP in Faker ([#445](#445)) ([2deced1](2deced1))


### Bug Fixes

* **deps:** Update golang.org/x/exp digest to 6ab00d0 ([#449](#449)) ([b981e33](b981e33))
* **deps:** Update module github.com/avast/retry-go/v4 to v4.3.1 ([#450](#450)) ([e4116f1](e4116f1))
* **deps:** Update module google.golang.org/grpc to v1.51.0 ([#451](#451)) ([538211c](538211c))
* Don't log start-and-finish of relational tables ([#459](#459)) ([4d6eeca](4d6eeca))
* Sync Metrics for Long running plugins ([#455](#455)) ([3fecc61](3fecc61))
* TablesForSpec should only return top-level tables ([#456](#456)) ([ab7ca97](ab7ca97))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants