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

infrastructure manager metrics (2/n) #119

Merged
merged 18 commits into from
Mar 8, 2024
Merged

Conversation

Disper
Copy link
Member

@Disper Disper commented Jan 3, 2024

Description

Changes proposed in this pull request:

  • GardenCluster States gauge metrics

Should work better than the current metrics but will need additional adjustments:

  • tests still needs adjustment
  • internal/controller/metrics/metrics.go#cleanUpGardenerClusterGauge will be also additionally improved

Related issue(s)
#11

@kyma-bot kyma-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 3, 2024
@kyma-bot
Copy link
Contributor

kyma-bot commented Jan 3, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 3, 2024
@kyma-bot kyma-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 4, 2024
@Disper Disper marked this pull request as ready for review March 5, 2024 09:59
@Disper Disper requested a review from a team as a code owner March 5, 2024 09:59
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2024
@Disper Disper changed the title infrastructure manager metrics infrastructure manager metrics (2/n) Mar 5, 2024
if errorMetric != nil {
errorMetric.Set(0)
}
fmt.Printf("GardenerClusterStates set value to 0 for %v", runtimeID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use logger for logging? Rest of the code uses logr.Logger

Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed this debug line

@kyma-bot kyma-bot added the area/ci Issues or PRs related to CI related topics label Mar 7, 2024
}

func IncrementReconciliationLoopsStarted() {
playgroundTotalReconciliationLoopsStarted.Inc()
func (m Metrics) UnSetGardenerClusterStates(runtimeID string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this function is pointless, isn't it? Just make CleanUpGardenerClusterGauge public

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! fixed in dec8b6d

@kyma-bot kyma-bot added the lgtm Looks good to me! label Mar 8, 2024
@kyma-bot kyma-bot merged commit 7dff581 into kyma-project:main Mar 8, 2024
7 checks passed
@Disper Disper deleted the metrics branch May 15, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Issues or PRs related to CI related topics cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants