prom-client#collectDefaultMetrics TypeScript Examples

The following examples show how to use prom-client#collectDefaultMetrics. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts    From common-ts with MIT License 5 votes vote down vote up
createMetrics = (): Metrics => {
  // Collect default metrics (event loop lag, memory, file descriptors etc.)
  collectDefaultMetrics()

  return { client: prometheus, registry: prometheus.register }
}
Example #2
Source File: index.ts    From livepeer-com with MIT License 5 votes vote down vote up
collectDefaultMetrics({ prefix: "livepeer_api_" });
Example #3
Source File: prometheus.ts    From squid with GNU General Public License v3.0 5 votes vote down vote up
constructor() {
        collectDefaultMetrics({register: this.registry})
        this.setLastProcessedBlock(-1)
        this.setChainHeight(-1)
    }