Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

piscopoc/fastify-statsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastify-statsd

Add statsd logging for your endpoints in Fastify

You need to use Fastify version 0.31 or newer, the hook used (onSend) was added in this version

Install

npm install --save fastify-statsd

Usage

Add it to you project with register and you are done!

// Register the plugin
fastify.register(require('fastify-statsd'), { host: 'localhost', port: 8125, metric_name: 'my_endpoint' });

Options

This plugin allows you to specify the following options:

  • metric_name is used when prefixing metric names sent to statsd
  • host statsd host, defaults to 'localhost'
  • port statsd port number, defaults to 8125

About

Add statsd logging for each request for Fastify

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published