简体   繁体   中英

Does prometheus golang (echo-contrib) exporter saves metrics in memory?

I have a GoLang middleware for exporting metrics for prometheus, which are then served from /metrics endpoint

My question is where does the data received from /metrics endpoint come from? Does it come from the memory?

Exporter link:https://github.com/labstack/echo-contrib/tree/master/prometheus

Yes, the last state of the metrics are stored in memory of the scraped target. Most of the implementation of prometheus metrics are built with this library in go programs: https://github.com/prometheus/client_golang

Your scraped target won't hold the whole time serie, it's prometheus role to store these values across time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM