Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

healthchecks: Improve monitoringPing retry logic. #1433

Merged
merged 8 commits into from
Sep 27, 2023

Conversation

franciscovalentecastro
Copy link
Contributor

@franciscovalentecastro franciscovalentecastro commented Sep 20, 2023

Description

The previously merged PR #1415 fixed the following error when restarting the Ops Agent very quickly :

[API Check] Result: ERROR, Detail: rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: One or more points were written more frequently than the maximum sampling period configured for the metric.

This PR improves the retry logic to avoid waiting 6 seconds after the second metric write request.

Related issue

b/291631906

How has this been tested?

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@franciscovalentecastro franciscovalentecastro changed the title healthchecks: Retry metric write in monitoringPing only once. healthchecks: Simplify monitoringPing retry logic. Sep 20, 2023
@franciscovalentecastro franciscovalentecastro requested review from a team and jefferbrecht and removed request for a team September 20, 2023 15:21
internal/healthchecks/api_check.go Show resolved Hide resolved
internal/healthchecks/api_check.go Outdated Show resolved Hide resolved
@franciscovalentecastro franciscovalentecastro changed the title healthchecks: Simplify monitoringPing retry logic. healthchecks: Improve monitoringPing retry logic. Sep 20, 2023
Copy link
Member

@jefferbrecht jefferbrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some additional minor/optional comments

Copy link
Member

@jefferbrecht jefferbrecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@franciscovalentecastro franciscovalentecastro merged commit f8166b3 into master Sep 27, 2023
59 checks passed
@igorpeshansky igorpeshansky deleted the fcovalente-update-monitoring-ping branch September 29, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants