Skip to content

Commit 105b4d0

Browse files
authored
Merge pull request #21 from Chronos2-0/ben-mizel-patch-2
Ben mizel patch 2
2 parents 0092716 + 29992e5 commit 105b4d0

File tree

1 file changed

+105
-17
lines changed

1 file changed

+105
-17
lines changed

README.md

Lines changed: 105 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,110 @@
1-
# What is Chronos?
2-
A tool for visualizing communication and health throughout a microservices application
1+
![Chronos logo](https://raw.githubusercontent.com/Chronos2-0/Chronos/master/app/assets/logo2.png)
2+
## Chronos
3+
Microservice communication and health visualizer.
34

4-
## How can I use Chronos?
5-
1. Go to https://www.npmjs.com/package/chronos-microservice-debugger and follow the instructions to install the NPM package within each microservice of your application
6-
2. Download this repo
7-
3. Inside the downloaded directory, run `npm install` followed by `npm start`
5+
[![NPM Version][npm-image]][npm-url]
6+
[![NPM Downloads][downloads-image]][downloads-url]
7+
8+
```js
9+
const cmd = require('chronos-microservice-debugger3')
10+
cmd.propagate()
11+
12+
app.use('/', cmd.microCom('microserviceName', 'databaseType', 'databaseURL', 'wantMicroHealth', 'queryFrequency'))
13+
```
14+
15+
## Features
16+
17+
* HTTP request tracing
18+
* Speed and latency tracking
19+
* Process monitoring
20+
* Memory usage
21+
22+
## Installation
23+
24+
Chronos consists of a [Node](https://nodejs.org/en/) module available through the
25+
[npm registry](https://www.npmjs.com/) and a lightweight [Electron](https://electronjs.org/) desktop application.
26+
27+
#### Node module
28+
29+
To begin, install the [Chronos](https://www.npmjs.com/package/chronos-microservice-debugger3) node module within each microservice of your application using the
30+
[`npm install`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)command:
31+
32+
```
33+
npm install chronos-microservice-debugger3
34+
```
35+
36+
Once installed, write the following two lines at the top of each microservice's server file:
37+
```javascript
38+
const cmd = require('chronos-microservice-debugger3');
39+
cmd.propagate();
40+
```
41+
42+
Then add a route handler for all incoming requests:
43+
```js
44+
app.use('/', cmd.microCom('microserviceName', 'databaseType', 'databaseURL', 'wantMicroHealth', 'queryFrequency'))
45+
```
46+
47+
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.
48+
49+
cmd.microCom takes four parameters and an optional fifth parameter. You can enter the arguments as individual strings or as an array.
50+
51+
The parameters are:
52+
1. microserviceName: To identify the microservice (i.e. "payments")
53+
2. databaseType: Enter either "mongo" or "sql"
54+
3. databaseURL: Enter the URL of your database
55+
4. wantMicroHealth: Do you want to monitor the health of this microservice? Enter "yes" or "no"
56+
5. queryFrequency (optional): How frequently do you want to log the health of this microservice? It defaults to every minute, but you can choose:
57+
* "s" : every second
58+
* "m" : every minute (default)
59+
* "h" : every hour
60+
* "d" : once per day
61+
* "w" : once per week
62+
63+
String parameter example:
64+
```javascript
65+
app.use('/', cmd.microCom('payments', 'mongo', 'mongodb+srv://user:[email protected]/','yes','h'))
66+
```
67+
68+
Array parameter example:
69+
```javascript
70+
let values = [
71+
'payments',
72+
'mongo',
73+
'mongodb+srv://user:[email protected]/',
74+
'yes',
75+
'h'
76+
]
77+
78+
app.use('/', cmd.microCom(values)
79+
```
80+
81+
#### Electron desktop application
82+
83+
After installing the node module in each microservice, download the Electron desktop application from the public [Chronos](https://github.com/Chronos2-0/Chronos) repo.
84+
85+
Inside the downloaded directory, install all dependencies using the `npm install` command followed by the `npm start` command to start the Electron desktop application.
86+
87+
## Contributing
888
9-
## How can I contribute to Chronos?
1089
Chronos hopes to inspire an active community of both users and developers. For questions, comments, or contributions, please submit a pull request.
1190
12-
## Who created Chronos?
13-
* Mohtasim Chowdhury
14-
* Natalie Umanzor
15-
* Michelle Herrera
16-
* Duane McFarlane
17-
* Ben Mizel
18-
* Timothy Atapagra
19-
* Jenae Pennie
20-
* Chris Romano
21-
* Ousman Diallo
91+
## People
92+
93+
[Tim Atapagra](https://github.com/orgs/Chronos2-0/people/timpagra),
94+
[Mohtasim Chowdhury](https://github.com/mohtasim317),
95+
[Ousman Diallo](https://github.com/orgs/Chronos2-0/people/Dialloousman),
96+
[Michelle Herrera](https://github.com/mesherrera),
97+
[Duane McFarlane](https://github.com/Duane11003),
98+
[Ben Mizel](https://github.com/orgs/Chronos2-0/people/ben-mizel),
99+
[Jenae Pennie](https://github.com/orgs/Chronos2-0/people/jenaepen),
100+
[Chris Romano](https://github.com/orgs/Chronos2-0/people/robicano22),
101+
[Natalie Umanzor](https://github.com/nmczormick)
102+
103+
## License
104+
105+
[MIT](LICENSE)
22106
107+
[npm-image]: https://img.shields.io/npm/v/chronos-microservice-debugger3.svg
108+
[npm-url]: https://www.npmjs.com/package/chronos-microservice-debugger3
109+
[downloads-image]: https://img.shields.io/npm/dm/chronos-microservice-debugger3.svg
110+
[downloads-url]: https://npmjs.org/package/chronos-microservice-debugger3

0 commit comments

Comments
 (0)