Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nestjs-hot-shots

Package Overview
Dependencies
Maintainers
1
Versions
350
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-hot-shots

Hot-shots Module for Nest.js Framework

  • 2.0.20-dev.1718759538.509bb67
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
decreased by-31.89%
Maintainers
1
Weekly downloads
 
Created
Source

NestJS Hot-shots npm LICENSE Downloads Last Commit

Nest.JS logo

Hot-shots Module for Nest.js Framework. A Node.js client for Etsy's StatsD server, Datadog's DogStatsD server, and InfluxDB's Telegraf StatsD server.

Features

  • TypeScript types
  • Telegraf support
  • Events
  • Child clients
  • TCP/UDS Protocol support
  • Raw Stream Protocol support
  • Mock mode
  • Much more, including many bug fixes

For questions and support please use the Issues.

Installation

$ npm i nestjs-hot-shots hot-shots
$ yarn add nestjs-hot-shots hot-shots
$ pnpm add nestjs-hot-shots hot-shots

Usage

Once the installation process is complete, we can import the HotShotsModule into the root AppModule:

import { Module } from '@nestjs/common'
import { HotShotsModule } from 'nestjs-hot-shots';

@Module({
    imports: [
        HotShotsModule.forRoot({
            port: 8020,
            globalTags: { env: process.env.NODE_ENV }
        })
    ]
})
export class AppModule {
}

Then inject StatsD provider for use hot-shots:

import { Injectable } from '@nestjs/common';
import { StatsD } from 'hot-shots';

@Injectable()
export class AppMetrics {
    public constructor(private readonly metrics: StatsD) {
    }

    public metricStuff() {
        this.metrics.increment('somecounter');
    }
}

See the hot-shots module for more details.

Stay in touch

License

MIT © Alexey Filippov

Keywords

FAQs

Package last updated on 19 Jun 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc