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

Metrics and rules labeled from originating charm. #47

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

dstathis
Copy link
Contributor

Fixes #17

Issue

Previously we had all metrics and alert rules labeled with the topology of the principal charm. This caused issues as it was difficult, from charm code, to figure out which charm was principal. This also would have posed problems for multi-principal machines.

Solution

All alert rules and metrics now get topology labels from the charm from which they originated.

Testing Instructions

  1. Deploy kafka, zookeeper, hardware-observer, and grafana-agent
  2. Relate them to COS
  3. Check that logs, metrics, and alerts all have proper labels.

Release Notes

Simplified the labeling model of metrics and alert rules

Copy link
Member

@simskij simskij left a comment

Choose a reason for hiding this comment

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

don't forget to change charm-relation-interfaces correspondingly :)

Copy link
Contributor

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

I have some reservations about the implementation, mostly ergonomic and opinionated.
But overall it looks good, so I'm not blocking.

lib/charms/grafana_agent/v0/cos_agent.py Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants