🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

nitro-prometheus-middleware

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nitro-prometheus-middleware

This is a middleware for nitro, that expose metrics for prometheus.

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
1.7K
47.86%
Maintainers
1
Weekly downloads
 
Created
Source

npm

Nitro Prometheus Middleware

This is a middleware for nitro, that expose metrics for prometheus.

🚀 Usage

  • Install
npm install nitro-prometheus-middleware

Nitro

  • Add nitro-prometheus-middleware to the plugins section of nitro.config.ts
import { defineNitroConfig } from 'nitropack'

export default defineNitroConfig({
  plugins: [
    'node_modules/nitro-prometheus-middleware/dist/index.mjs'
  ]
})

Nuxt3

  • Add nitro-prometheus-middleware to the nitro.plugins section of nuxt.config.ts
import { resolve } from 'path';

export default defineNuxtConfig({
  nitro: {
    plugins: [
      resolve('node_modules/nitro-prometheus-middleware/dist/index.mjs')
    ]
  }
})
  • Metrics are available under /metrics

Metrics

Metric NameDescription
http_requests_totalCounter for total requests received

There some default metrics exported from Prom-Client

Keywords

nitro

FAQs

Package last updated on 21 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts