Skip to content

Conversation

@Zaggy21
Copy link
Contributor

@Zaggy21 Zaggy21 commented Jul 22, 2025

Description

This PR adds a resource-agnostic metric greenhouse_owned_by_label_missing with Prometheus alert.
It refactors all the metrics to be in the internal metrics package.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

k.zagorski added 13 commits July 18, 2025 15:26
…s to metrics import

On-behalf-of: @SAP krzysztof.zagorski@sap.com
On-behalf-of: @SAP krzysztof.zagorski@sap.com
…orts

On-behalf-of: @SAP krzysztof.zagorski@sap.com
…ugin and cluster controllers

On-behalf-of: @SAP krzysztof.zagorski@sap.com
…nding controllers

On-behalf-of: @SAP krzysztof.zagorski@sap.com
On-behalf-of: @SAP krzysztof.zagorski@sap.com
@Zaggy21 Zaggy21 requested review from a team as code owners July 22, 2025 09:03
@Zaggy21 Zaggy21 linked an issue Jul 22, 2025 that may be closed by this pull request
3 tasks
@github-actions github-actions bot added documentation Improvements or additions to documentation feature helm-charts labels Jul 22, 2025
k.zagorski added 4 commits July 22, 2025 13:17
On-behalf-of: @SAP krzysztof.zagorski@sap.com
On-behalf-of: @SAP krzysztof.zagorski@sap.com
On-behalf-of: @SAP krzysztof.zagorski@sap.com
Copy link
Contributor

@IvoGoman IvoGoman left a comment

Choose a reason for hiding this comment

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

Good idea to unify the metrics related code in dedicated files across all controllers.

The metrics/plugin_metrics.go is a special case. It was created to update metrics in both helm and internal/controller/plugin packages.
There seems to be no reuse between controllers for the other files, so I would suggest to keep the metrics in a metrics.go file in the same package as the controller.

For the shared metrics, it might be good to combine them in a internal/util/metrics.go file. So we can keep metrics local to where they are being emitted and only move the shared functions out to the shared location.

k.zagorski added 2 commits July 30, 2025 00:30
…er specific metrics to controller packages

On-behalf-of: @SAP krzysztof.zagorski@sap.com
k.zagorski added 2 commits August 1, 2025 13:17
@Zaggy21 Zaggy21 merged commit 0719a22 into main Aug 4, 2025
28 checks passed
@Zaggy21 Zaggy21 deleted the feat/missing-owner-labels-metrics-alert branch August 4, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature helm-charts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] - Missing owner labels metrics + alert

3 participants