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

Docs: add Mimir dashboards example screenshots to doc #992

Merged
merged 6 commits into from
Feb 7, 2022

Conversation

pracucci
Copy link
Collaborator

@pracucci pracucci commented Feb 1, 2022

What this PR does:
In this PR I propose to add Mimir dashboards screenshots to our doc. Screenshots are generated with a command and the proposal is to update them as part of the release process.

I've also introduced a tool to serve the dashboards locally running make mixin-serve which I think it's very useful while developing changes to dashboards jsonnet in order to have a quick feedback look (I've already used it and save me tons of time).

Which issue(s) this PR fixes:
N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@pracucci pracucci force-pushed the automate-dashboards-screenshots branch from ee1a2b7 to 0b50041 Compare February 3, 2022 17:28
@pracucci pracucci force-pushed the automate-dashboards-screenshots branch from 0b50041 to 71d5734 Compare February 4, 2022 10:05
@pracucci pracucci changed the title Add tool to auto-generate Mimir dashboards screenshots Docs: add Mimir dashboards example screenshots to doc Feb 4, 2022
Signed-off-by: Marco Pracucci <[email protected]>
weight: 170
---

# Slow queries
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have a good example to show here, so no screenshot.

weight: 140
---

# Top tenants
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have a good example to show here, so no screenshot.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like some room for fun. :)

@pracucci pracucci marked this pull request as ready for review February 4, 2022 10:17
Signed-off-by: Marco Pracucci <[email protected]>
@osg-grafana
Copy link
Contributor

@chri2547, here are a set of files that are getting auto-generated that we need to know about when refactoring content.

@pstibrany
Copy link
Member

Tooling looks awesome. One feature-request: can we have GRAFANA_PORT in operations/mimir-mixin-tools/serve/.config too? I already have one Grafana running on port 3000, and running make mixin-serve fails because of that.

@pracucci
Copy link
Collaborator Author

pracucci commented Feb 4, 2022

Tooling looks awesome. One feature-request: can we have GRAFANA_PORT in operations/mimir-mixin-tools/serve/.config too? I already have one Grafana running on port 3000, and running make mixin-serve fails because of that.

Good idea, done! I just named it GRAFANA_PUBLISHED_PORT to make it clear that's not the Grafana port, but the port on which Grafana is published on the host.

@pstibrany
Copy link
Member

Good idea, done! I just named it GRAFANA_PUBLISHED_PORT to make it clear that's not the Grafana port, but the port on which Grafana is published on the host.

Thank you, just tested it and it works great.

Signed-off-by: Marco Pracucci <[email protected]>
await page.screenshot({path: screenshotPath});
await page.close();

// Optimize the png (lossless)
Copy link
Member

Choose a reason for hiding this comment

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

pngquant is actually lossy, but I haven't really noticed change of quality.

Copy link
Member

Choose a reason for hiding this comment

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

Well, with your parameters, maybe not :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I configured it with --quality 100 which, according to the doc, means that doesn't apply the optimization if quality is not at least 100 (which is the max). That's all I "know".

Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Love this, very nice!

@GrafanaWriter
Copy link
Contributor

This looks great, thanks for creating this tool, @pracucci. We'd definitely be interested in seeing where else we can use this to generate screen shots.

A couple of questions:

  • what is the source that these shots rely on? Basically, where are we pulling the data from?
  • Are we scrubbing the displayed data before we take the shot? (looking at the displayed screen shots, this may not be a valid concern for this use case, but it may be if we look at using this tool in other projects)

@pracucci
Copy link
Collaborator Author

pracucci commented Feb 4, 2022

what is the source that these shots rely on? Basically, where are we pulling the data from?

I pull data from one of our dev cluster that we use to test Mimir. It contains no production data and no customer data.

Are we scrubbing the displayed data before we take the shot?

Do you mean if I mangle the web page before taking the screenshot? If that's the question, then no, I don't. I take the screenshot of the page "as is".

@GrafanaWriter
Copy link
Contributor

I pull data from one of our dev cluster that we use to test Mimir. It contains no production data and no customer data.

Super, that's what we need.

Do you mean if I mangle the web page before taking the screenshot? If that's the question, then no, I don't. I take the screenshot of the page "as is".

Yes, that was my question. Great, that helps me understand what this tool can do. Thanks again.

@pracucci pracucci merged commit 3302af4 into main Feb 7, 2022
@pracucci pracucci deleted the automate-dashboards-screenshots branch February 7, 2022 08:21
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.

4 participants