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

Improve logging of resource sync #1570

Open
arminfelder opened this issue Jun 5, 2024 · 3 comments
Open

Improve logging of resource sync #1570

arminfelder opened this issue Jun 5, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@arminfelder
Copy link

Is your feature request related to a problem? Please describe.

  1. if a resource e.g. GrafanaDashboard, is skipped, because it lacks
spec.allowCrossNamespaceImport: true

no information hinting at the missing setting is logged.

I would like to see, an INFO line e.g.:

GrafanaDashboard skipped, because it is not in namespace xyz, and allowCrossNamespaceImport is not set or false
  1. I would like to see an INFO line, informing about the sync status, e.g.:
GrafanaDashboard xyz updated in Grafana-x
GrafanaDashboard zzz created in Grafana-x
GrafanaDashboad nnn removed from Grafana-x
GrafanaDashboard sss uptodate in Grafana-x
@arminfelder arminfelder added enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 5, 2024
@NissesSenap
Copy link
Collaborator

@arminfelder we are happy to take a PR around this.

@theSuess theSuess added good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 10, 2024
@Sheikh-Abubaker
Copy link

@NissesSenap I would like to work on this, can you please tell me which file should I look into ?

@NissesSenap
Copy link
Collaborator

@Sheikh-Abubaker that is great. In this case it's probably in https://github.com/grafana/grafana-operator/blob/master/controllers/dashboard_controller.go, but this is something that needs to be improved in all the controllers.

But if you take a look in sure you will find a good row to add this info log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants