Skip to content

🚀feat(cyclops-ctrl): adds prometheus metrics to reconciler #609

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

Merged

Conversation

naineel1209
Copy link
Contributor

closes #598

📑 Description

  • added required reconciler metrics to the Prometheus monitor
  • currently added metrics are
type Monitor struct {
	ModulesDeployed  prometheus.Gauge
	CacheHits        prometheus.Gauge
	CacheMisses      prometheus.Gauge
	CacheKeysAdded   prometheus.Gauge
	CacheCostAdded   prometheus.Gauge
	CacheKeysEvicted prometheus.Gauge
	CacheCostEvicted prometheus.Gauge

	// Reconciler Metrics
	ReconcilerDuration   prometheus.Histogram
	NoOfReconciliations   prometheus.Counter
	FailedReconciliations prometheus.Counter
}
  • added methods to update the reconciler metrics
  • added increment for no_of_reconciliations for every attempted reconciliation
  • added increment for failed_reconciliations for every failed reconciliation
  • added deferred function call to observe the amount of time spent in reconciliation

✅ Checks

  • [✅] I have tested my code (provide screenshots or screen recordings of a working solution)
  • [✅] I have performed a self-review of my code

ℹ Additional context

@naineel1209 naineel1209 requested a review from a team as a code owner October 4, 2024 17:02
@naineel1209
Copy link
Contributor Author

@quest-bot loot #598

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 4, 2024
Copy link

quest-bot bot commented Oct 4, 2024

Quest PR submitted! image Quest PR submitted!

@naineel1209, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

@naineel1209 naineel1209 changed the title feat(cyclops-ctrl): adds prometheus metrics to reconciler 🚀feat(cyclops-ctrl): adds prometheus metrics to reconciler Oct 4, 2024
Copy link
Collaborator

@petar-cvit petar-cvit left a comment

Choose a reason for hiding this comment

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

Left a couple of comments on naming, but looks good

@naineel1209 naineel1209 requested a review from petar-cvit October 6, 2024 12:42
Copy link
Collaborator

@petar-cvit petar-cvit left a comment

Choose a reason for hiding this comment

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

Thanks @naineel1209 🧡

@petar-cvit petar-cvit merged commit a74945a into cyclops-ui:main Oct 10, 2024
1 check passed
Copy link

quest-bot bot commented Oct 10, 2024

🧚 @naineel1209 congratulations for completing Quest #598

💰 A reward has been credited to you.

To claim your reward follow the instructions here.

Questions? Check out the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emit Module reconciler metrics
2 participants