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

Disable metrics for entire GVK #14

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

kumaramit01
Copy link
Contributor

Closes https://reddit.atlassian.net/browse/SHR-612

💸 TL;DR

This PR adds DisableMetrics option to MetricsOptions configuration of the Metrics.

📜 Details

The function MustMakeMetricsWithOptions allows setting up the DisableMetrics and will be used in building the reconciler.

image

🧪 Testing Steps / Validation

Please see metrics_test.go

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@kumaramit01 kumaramit01 requested a review from a team as a code owner January 21, 2025 18:11
@kumaramit01 kumaramit01 requested a review from kdorosh January 21, 2025 18:11
Copy link

@kdorosh kdorosh left a comment

Choose a reason for hiding this comment

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

one nit on internal type preference -- up to you whether you want to address or not

Comment on lines +54 to +55
// DisableMetrics is a list of metrics to be disabled.
DisableMetrics []AchillesMetrics
Copy link

Choose a reason for hiding this comment

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

given that this is used as a set, I think it's better stored and reasoned about as a set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a pretty small array of upto 5 elements, will keep it as a string array.

@kumaramit01 kumaramit01 merged commit 57f66b1 into reddit:main Jan 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants