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

@nodescript/metrics

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodescript/metrics

Tiny backend metrics collection library

latest
Source
npmnpm
Version
1.7.1
Version published
Maintainers
0
Created
Source

Metrics

Collect metrics with simple and concise API.

Uses Mesh IoC.

Usage

  • Use counters, gauges and histograms to collect metrics in your application.

    export class MyService {
    
        @metric()
        counter = new CounterMetric('my_service_counter_total', 'Total number of times something important happened.');
    
        doSomething() {
            // ...
            counter.incr();
        }
    
    }
    
  • Generate a Prometheus report from all metrics defined in your mesh:

    const report = generateMetricsReport(mesh);
    

FAQs

Package last updated on 22 Dec 2024

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