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

simple-logger-api-monitor

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-logger-api-monitor

Visualize requests over time, with average response times and error rates

  • 0.7.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Simple Logger / API Monitor (SLAM) for Express

Visualize requests over time, with average response times and error rates

Installation

npm i -s simple-logger-api-monitor

Setup

Add the following line before your Express routes (ensuring you pass your app to this module):

require('simple-logger-api-monitor')(app);

This will add a new global, global.slamCounts, and two new routes: GET /slamCounts & GET /monitor. Additionally, a middleware will track each request, and log statistics about each request. Overhead should not be noticeable, even with heavy traffic.

Usage

You do not need to monitor your app to use this page. Simply visit the /monitor route of your application to view usage statistics for your app API routes. Detailed statistics are kept for 2 hours. Data is purged each time your app restarts. Clustering is supported.

Issues

The intent is for this to remain very simple and easy to use, so the scope of features is intentionally small.

However, If you run in to any issues feel free to open an issue.

Contributing

Contributions welcome! Please open an Issue before creating a pull request.

Keywords

FAQs

Package last updated on 16 Apr 2020

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