Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
simple-logger-api-monitor
Advanced tools
Readme
Add an API monitoring page to your Express app in 3 seconds. Visualizes requests over time, with average response times and error rates.
npm i -s simple-logger-api-monitor
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.
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.
Currently, you can pass an environment variable HOSTNAME
or SLAM_HOSTNAME
(namespace safe) to set the hostname of your apis (optional).
You can also customize your monitor page title and path via environment variables.
Additionally, you can enable or disable logging, especially of slow requests.
SLAM_MONITOR_PATH='/monitor'
SLAM_PAGE_TITLE='API Monitor'
SLAM_LOG_LONG_REQUESTS=true
SLAM_MAX_REQUEST_LENGTH=5000
SLAM_DEBUG=false
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.
Contributions welcome! Please open an Issue before creating a pull request.
FAQs
Visualize requests over time, with average response times and error rates
The npm package simple-logger-api-monitor receives a total of 12 weekly downloads. As such, simple-logger-api-monitor popularity was classified as not popular.
We found that simple-logger-api-monitor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.