npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chronos-microservice-debugger3

v2.0.3

Published

Microservice communication and health visualizer.

Downloads

4

Readme

Chronos logo

Chronos

Microservice communication and health visualizer.

NPM Version NPM Downloads

const cmd = require('chronos-microservice-debugger3')
cmd.propagate()

app.use('/', cmd.microCom('microserviceName', 'databaseType', 'databaseURL', 'wantMicroHealth', 'queryFrequency'))

Features

  • HTTP request tracing
  • Speed and latency tracking
  • Process monitoring
  • Memory usage

Installation

Chronos consists of a Node module available through the npm registry and a lightweight Electron desktop application.

Node module

To begin, install the Chronos node module within each microservice of your application using the npm installcommand:

npm install chronos-microservice-debugger3

Once installed, write the following two lines at the top of each microservice's server file:

const cmd = require('chronos-microservice-debugger3');
cmd.propagate();

Then add a route handler for all incoming requests:

app.use('/', cmd.microCom('microserviceName', 'databaseType', 'databaseURL', 'wantMicroHealth', 'queryFrequency'))

The cmd.microCom handler function logs communication and health data to a user-provided database. This is to ensure that your private data stays private. We currently support MongoDB and SQL/PostgreSQL databases.

cmd.microCom takes four parameters and an optional fifth parameter. You can enter the arguments as individual strings or as an array.

The parameters are:

  1. microserviceName: To identify the microservice (i.e. "payments")
  2. databaseType: Enter either "mongo" or "sql"
  3. databaseURL: Enter the URL of your database
  4. wantMicroHealth: Do you want to monitor the health of this microservice? Enter "yes" or "no"
  5. queryFrequency (optional): How frequently do you want to log the health of this microservice? It defaults to every minute, but you can choose:
  • "s" : every second
  • "m" : every minute (default)
  • "h" : every hour
  • "d" : once per day
  • "w" : once per week

String parameter example:

app.use('/', cmd.microCom('payments', 'mongo', 'mongodb+srv://user:[email protected]/','yes','h'))

Array parameter example:

let values = [
  'payments',
  'mongo',
  'mongodb+srv://user:[email protected]/',
  'yes',
  'h'
]

app.use('/', cmd.microCom(values)

Electron desktop application

After installing the node module in each microservice, download the Electron desktop application from the public Chronos repo.

Inside the downloaded directory, install all dependencies using the npm install command followed by the npm start command to start the Electron desktop application.

Contributing

Chronos hopes to inspire an active community of both users and developers. For questions, comments, or contributions, please submit a pull request.

People

Tim Atapagra, Mohtasim Chowdhury, Ousman Diallo, Michelle Herrera, Duane McFarlane, Ben Mizel, Jenae Pennie, Chris Romano, Natalie Umanzor

License

MIT