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

return cached result for a page scrape #21

Open
cuotos opened this issue Mar 23, 2020 · 1 comment
Open

return cached result for a page scrape #21

cuotos opened this issue Mar 23, 2020 · 1 comment

Comments

@cuotos
Copy link

cuotos commented Mar 23, 2020

I know returning a cached copy of prom metrics from an app isn't best practice, but for things like this exporter, I am happy to get a report of the page performance once and hour (or even less), but prometheus will drop the metrics after 5 mins, so the graph will just be a broken line for 5 mins at a time.

It would be a nice feature if the PagespeedExporter could just return a cached copy of the results, until such time those results are considered out of date (1h, 1d etc), prometheus can then scrape the exporter regularly (30s) without creating addition requests to the pagespeed apis

The "lifetime" of the data could be passed as a query param.

@smartinov
Copy link
Contributor

@cuotos I agree with that statement, I'm wondering why Brian Brazil had a different intake and, I refactored it to be generated on demand.

Perhaps I could add a parameter, as you've noted so that the graph looks way nicer.

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

No branches or pull requests

2 participants