{"repo":"SocketSomeone/nestjs-hot-shots","free":true,"listed":false,"github":"https://github.com/SocketSomeone/nestjs-hot-shots","clone":"git clone https://github.com/SocketSomeone/nestjs-hot-shots.git","description":"🐶 Hot-shots Module for Nest.js Framework","language":"TypeScript","stars":21,"topics":["hot-shots","metrics","datadog","telegraf","nest","nestjs","typescript"],"license":"MIT","category":"analytics","readme_excerpt":"NestJS Hot-shots 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 Usage Once the installation process is complete, we can import the HotShotsModule into the root AppModule : Then inject StatsD provider for use hot-shots : Metrics You can use the MetricsService for metrics collection. It s factory for creating metrics. It provides a set of methods to create different types of metrics, such as counters, gauges, and histograms. Method Description ---------------------------------- -------------------------------------------------------- getCounter(name: string) Returns a counter metric with the given name. getGauge(name: string) Returns a gauge metric with the given name. getHistogram(name: string) Returns a histogram metric with the given name. getTimer(name: string) Returns a timer metric with the given name. getUpDownCounter(name: string) Returns an up-down counter metric with the given name. HTTP Metrics via Middleware You can use the HttpMetricsMiddleware to collect HTTP metrics. It will automatically collect metrics for all incoming requests and outgoing responses. Metric Description Type -------------------------------------- ----------","default_branch":null,"files":null,"tree":[],"storefront":"/r/SocketSomeone","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/SocketSomeone/nestjs-hot-shots/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}