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

Add dashboard tag for charm name if it is missing #368

Open
sed-i opened this issue Dec 16, 2024 · 0 comments
Open

Add dashboard tag for charm name if it is missing #368

sed-i opened this issue Dec 16, 2024 · 0 comments

Comments

@sed-i
Copy link
Contributor

sed-i commented Dec 16, 2024

Enhancement Proposal

Per ADR, it would be handy if dashboards had a tag indicating the name of the charm it came from (not the app name!).

An easy way to accomplish this with zero changes elsewhere is by adding the tag ourselves, if it is missing. We would need to do it in two places:

GrafanaDashboardProvider

for path in filter(_is_dashboard, Path(self._dashboards_path).glob("*")):
# path = Path(path)
id = "file:{}".format(path.stem)
stored_dashboard_templates[id] = self._content_to_dashboard_object(
_encode_dashboard_content(path.read_bytes()), inject_dropdowns
)
stored_dashboard_templates[id]["dashboard_alt_uid"] = self._generate_alt_uid(id)

grafana-agent-operator

https://github.com/canonical/grafana-agent-operator/blob/efff57b4d1f3eb8bb397b58d4d2f4373bc88e474/src/grafana_agent.py#L467-L476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant