Skip to content

Comments

Add a caching layer to scrapers#86

Open
isaacseymour wants to merge 2 commits intornaveiras:mainfrom
isaacseymour:cached-metrics
Open

Add a caching layer to scrapers#86
isaacseymour wants to merge 2 commits intornaveiras:mainfrom
isaacseymour:cached-metrics

Conversation

@isaacseymour
Copy link
Contributor

  • first separate the Exporter from the ExporterRun, so that we can only instantiate the Exporter once, and then instantiate a fresh ExporterRun on each scrape (which has the http request context, and the Exporter)
  • then add a caching scraper, which stores the last seen values (per database) in a slice, and returns that if the TTL hasn't passed yet

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.

1 participant