How to use the express-prom-bundle function in express-prom-bundle

To help you get started, we’ve selected a few express-prom-bundle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethereum-optimism / optimism / packages / data-transport-layer / src / services / server / service.ts View on Github external
private _initMetrics() {
    this.metrics = new Metrics({
      prefix: this.name,
      labels: {
        environment: this.options.nodeEnv,
        network: this.options.ethNetworkName,
        release: this.options.release,
      },
    })
    const metricsMiddleware = promBundle({
      includeMethod: true,
      includePath: true,
    })
    this.state.app.use(metricsMiddleware)
  }

express-prom-bundle

express middleware with popular prometheus metrics in one bundle

MIT
Latest version published 1 month ago

Package Health Score

80 / 100
Full package analysis