Skip to content

Hapi plugin to send response metrics to AWS CloudWatch

License

Notifications You must be signed in to change notification settings

weyert/hapi-cloudwatch

 
 

Repository files navigation

hapi-cloudwatch

A hapi plugin for sending request response time metrics to AWS CloudWatch.

Build Status Coverage Status npm version Dependencies Status DevDependencies Status Known Vulnerabilities

Installation

npm install hapi-cloudwatch

Usage

To install this plugin on your Hapi server, do something similar to this:

var Hapi = require('hapi');
var server = new Hapi.Server();

var options = {};

server.register({ register: require('hapi-cloudwatch'), options }, function(err) {
  if (err) {
    console.log('error', 'Failed loading plugin: hapi-cloudwatch');
  }
});

Plugin Options

region

AWS region to send the metrics to.

Defaults to eu-west-1

environment