Socket
Socket
Sign inDemoInstall

elysia-prometheus-metrics

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    elysia-prometheus-metrics

ElysiaJS middleware exporting HTTP request duration metrics


Version published
Maintainers
1
Install size
31.1 kB
Created

Readme

Source

Elysia Prometheus metrics

coverage report

An Elysia.js middleware to export Prometheus metrics. Is is intended as a replacement to the express prometheus bundle for Elysia, without relying on prom-client as Bun does not support the PerformanceObserver yet (As of november 2023). Currently, this middleware only provides the http_request_duration_seconds histogram.

Installation

bun add elysia-prometheus-metrics

Usage

import { Elysia } from "elysia"
import metricsMiddleware from "elysia-prometheus-metrics"

const middlewareOptions = {}

new Elysia()
  .use(metricsMiddleware(middlewareOptions))
  .get("/", () => "Hello world")
  .listen(8080)

Keywords

FAQs

Last updated on 25 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc