Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: only start prometheus metrics in one place #2954

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions packages/ipfs/src/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ class HttpApi {
this._options = options || {}
this._log = debug(LOG)
this._log.error = debug(LOG_ERROR)

if (process.env.IPFS_MONITORING) {
// Setup debug metrics collection
const prometheusClient = require('prom-client')
const prometheusGcStats = require('prometheus-gc-stats')
const collectDefaultMetrics = prometheusClient.collectDefaultMetrics
collectDefaultMetrics({ timeout: 5000 })
prometheusGcStats(prometheusClient.register)()
}
}

async start () {
Expand Down