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

feat(new_metrics): retire stale metric entities that are not used by any other object #1304

Merged
merged 18 commits into from
Feb 7, 2023

Conversation

empiredan
Copy link
Contributor

@empiredan empiredan commented Jan 5, 2023

This PR is to resolve #1303.

New configuration is added:

[metrics]
+ entity_retirement_delay_ms = 600000

@empiredan empiredan marked this pull request as draft January 5, 2023 17:36
@github-actions github-actions bot added the cpp label Jan 5, 2023
@empiredan empiredan marked this pull request as ready for review January 6, 2023 05:15
src/utils/metrics.h Outdated Show resolved Hide resolved
src/utils/metrics.h Outdated Show resolved Hide resolved
src/utils/metrics.cpp Outdated Show resolved Hide resolved
src/utils/metrics.cpp Outdated Show resolved Hide resolved
@empiredan empiredan changed the title feat(new_metrics): retire the old metrics and entities that are not in use feat(new_metrics): retire the stale metrics and entities that are no longer used Jan 11, 2023
src/utils/metrics.cpp Outdated Show resolved Hide resolved
src/utils/metrics.cpp Outdated Show resolved Hide resolved
@empiredan empiredan changed the title feat(new_metrics): retire the stale metrics and entities that are no longer used feat(new_metrics): retire stale metric entities that are not used by any other object Feb 2, 2023
src/utils/metrics.cpp Outdated Show resolved Hide resolved
src/utils/metrics.cpp Outdated Show resolved Hide resolved
src/utils/metrics.cpp Outdated Show resolved Hide resolved
src/utils/metrics.cpp Show resolved Hide resolved
@@ -2828,4 +2831,216 @@ TEST(metrics_test, http_get_metrics)
}
}

using surviving_metrics_case = std::tuple<std::string, bool, bool, bool, bool>;

class MetricsRetirementTest : public testing::TestWithParam<surviving_metrics_case>
Copy link
Member

Choose a reason for hiding this comment

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

👍

@empiredan empiredan merged commit 624cae5 into apache:master Feb 7, 2023
@empiredan empiredan mentioned this pull request Aug 17, 2023
@empiredan empiredan added the type/config-change Added or modified configuration that should be noted on release note of new version. label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp type/config-change Added or modified configuration that should be noted on release note of new version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature(new_metrics): retire stale metric entities that are not used by any other object
3 participants