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

Log warning in case of listDimensions returns empty list #436

Merged
merged 1 commit into from
Jun 18, 2022

Conversation

or-shachar
Copy link
Contributor

Relates to #432 - print warning in case dimensions is empty.
Otherwise - it's hard to understand that configuration is wrong.

I wonder though if there is any scenario where the case of empty dimensions is actually okay.
If there are - then this warning may be spamming and wrong.

@matthiasr
Copy link
Contributor

Hmm, good point. Googling around I found grafana/grafana#42798. Can we somehow distinguish between custom and AWS metrics?

Signed-off-by: or-shachar <or.shachar@wiz.io>
@or-shachar
Copy link
Contributor Author

Nice catch! I removed the warning from this case.

IIUC the only way for it to work for a metric with no dimension is if we add an empty List to the dimensions list, so at the end of this function, there must be at least one item in the returned list.

@or-shachar
Copy link
Contributor Author

Also maybe we need to document that this configuration with empty list actually supports metric with no dimensions (and that no value implicates metric with no dimension)
image

@matthiasr
Copy link
Contributor

Yes indeed, I think the documentation around dimensions could be less technical and more practical. Nonetheless, thank you for adding the warning!

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

Successfully merging this pull request may close these issues.

None yet

2 participants