You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,14 @@ Chronos welcomes all pull requests.
13
13
5. Make sure code is formatted with `prettier` and follows the [Airbnb React/JSX Style Guide](https://github.com/airbnb/javascript/blob/master/react/README.md).
14
14
6. Create a pull request to `master`.
15
15
16
+
## Getting started
17
+
-`npm run bot`: Run Node and Electron at the same time to start Chronos app
18
+
- To make changes to codebase on the Main Process
19
+
- Files in the main process must be compiled prior to starting the app
20
+
- In the terminal un Chronos directory, input `tsc` to comile typescript files
21
+
- Once compiled, `npm run both`
22
+
* Note** If typescript is not installed, `npm install -g typescript`
23
+
16
24
## Issues
17
25
18
26
Please do not hesitate to file issues. Chronos is based off of community feedback and is always looking for ways to get better. The team behind Chronos is interested to hear about your experience and how we can improve it.
Chronos is a comprehensive developer tool that monitors the health and web traffic of servers, microservices, and containers. Use Chronos to see real-time data monitoring and receive automated notifications over Slack or email.
## <imgsrc ="./app/assets/fire.png"height=22 > New Features <imgsrc ="./app/assets/fire.png"height=24>
46
+
47
+
- New UI Features
48
+
- Dark and Light mode options now available across user sessions.
49
+
- Updated charts to now also support gRPC calls
50
+
- Integrated log to provide users with relational data on request & response cycle
51
+
- Bug Fixes
52
+
- Fixed bug where users could only connect to one MongoDB database and would see its microservices listed even when users clicked on applications using other MongoDB databases
53
+
- Chronos now support monitoring for gRPC!
54
+
- Distributed tracing across network request
55
+
- Currently chronos gRPC tracing for MongoDB and PostgresQL
56
+
45
57
## Features
46
58
47
59
- Distributed tracing enabled across microservices applications
48
-
- Supports <ahref="#"><imgsrc="./app/assets/http-logo-color.png"alt="HTTP"title="HTTP"align="center"height="20" /></a> protocol, with <imgsrc="./app/assets/grpc-logo-color.png"alt="gRPC"title="gRPC"align="center"height="20" /></a> _coming soon_
49
60
- Compatible with <imgsrc="./app/assets/graphql-logo-color.png"alt="GraphQL"title="GraphQL"align="center"height="20" /></a>
- Supports <ahref="#"><imgsrc="./app/assets/postgres-logo-color.png"alt="PostgreSQL"title="PostgreSQL"align="center"height="20" /></a> and <imgsrc="./app/assets/mongo-logo-color.png"alt="MongoDB"title="MongoDB"align="center"height="20" /></a> databases
@@ -65,8 +76,8 @@ Chronos is a comprehensive developer tool that monitors the health and web traff
65
76
## Installation
66
77
This is for the latest Chronos version **5.1 release and later**.
67
78
68
-
- Stable release: 5.1.0
69
-
- LTS release: 5.0.1
79
+
- Stable release: 6.1.0
80
+
- LTS release: 6.1.0
70
81
71
82
### Pre-Installation
72
83
Make sure you're running version 12.18.3 of <ahref="#"><imgsrc="./app/assets/node-logo-color.png"alt="Node"title="Node"align="center"height="20" /></a></a>, which is the most recent LTS (long-term support) version.
@@ -87,7 +98,7 @@ To use Chronos in your existing application, download and install the following
87
98
npm install chronos-tracker
88
99
```
89
100
90
-
### Configure Chronos
101
+
### Configure Chronos Tracker
91
102
92
103
Similarly, in the **root directory** of _each of your microservice applications_, create a `chronos-config.js` file with properties listed below:
93
104
@@ -101,8 +112,9 @@ chronos.use({
101
112
interval:2000,
102
113
dockerized:true,
103
114
database: {
115
+
connection:'REST',
104
116
type:'MongoDB',
105
-
URI:process.env.MONGO_URI,
117
+
URI:process.env.URI,
106
118
},
107
119
notifications: [],
108
120
});
@@ -115,6 +127,7 @@ The `interval` property is optional and takes in an integer. This controls the C
115
127
The `dockerized` property is optional and should be specified as `true` if the server is running inside of a Docker container. Otherwise, this should be `false`. If omitted, Chronos will assume this server is not running in a container.
116
128
117
129
The `database` property is required and takes in the following:
130
+
-`connection` which should be a string and only supports 'REST' and 'gRPC'
118
131
-`type` which should be a string and only supports 'MongoDB' and 'PostgreSQL'.
119
132
-`URI` which should be a connection string the database you intend Chronos to write and record data regarding health, HTTP route tracing, and container infomation to. A `.env` is recommended.
120
133
@@ -126,14 +139,16 @@ The `notifications` property is optional. Jump to the section below, [Notificati
126
139
<br>
127
140
<br>
128
141
129
-
### Initialize Chronos
142
+
### Initialize Chronos Tracker
143
+
#### Initialize Chronos Tracker for REST
130
144
131
145
Wherever you create an instance of your server (see example below),
132
146
133
147
```js
134
-
// Example
148
+
// Example for REST
135
149
constexpress=require('express');
136
150
constapp=express());
151
+
137
152
```
138
153
139
154
you will also need to require in `chronos-tracker` and initialize Chronos, as well as the `./chronos-config` file. You will then need to invoke `chronos.propagate()` to initiate the route tracing, in addition to implementing `chronos.track()` for all endpoints.
You should be good to go! The last step, **Docker Configuration**, is **only applicable** if you need to configure <ahref="#"><imgsrc="./app/assets/docker-logo-color.png"alt="Docker"title="Docker"align="center"height="20" /></a> for your application.
167
+
152
168
<br>
153
169
170
+
171
+
#### Initialize Chronos Tracker for gRPC
172
+
173
+
Wherever you create an instance of your server (see example below),
For any request you wish to trace, require uuidv4 and write the following code where the initial gRPC request begins,
239
+
```js
240
+
constrequire { v4:uuidv4} =require('uuid')
241
+
constcreateMeta= () => {
242
+
constmeta=newgrpc.Metadata();
243
+
meta.add('id', uuidvd());
244
+
return meta
245
+
}
246
+
```
247
+
and then invoke createMeta as a third argument to any client method that is the beginning of the request path.
248
+
249
+
```js
250
+
orderClient.AddOrder(
251
+
order,
252
+
(err, data) => {
253
+
if (err !==null) {
254
+
console.log(err);
255
+
// could not add order because bookID does not exist
256
+
returnres.sendStatus(404);
257
+
}
258
+
console.log('addOrder response: ', data);
259
+
returnres.sendStatus(200);
260
+
},
261
+
createMeta()
262
+
);
263
+
264
+
```
265
+
Finally, on all servers that will be involved in the request path, invoke `chronos.link` with parameters of `client` and `ServerWrapper` in the server wrapper.
266
+
267
+
```js
268
+
chronos.link(client, ServerWrapper);
269
+
```
270
+
154
271
### Docker Configuration
155
272
156
273
Again, this step is **only applicable** if you are currently using <ahref="#"><imgsrc="./app/assets/docker-logo-color.png"alt="Docker"title="Docker"align="center"height="20" /></a> containers for your microservices.
@@ -173,6 +290,11 @@ If you're using `docker-compose` to start up multiple containers, you can add a
173
290
volumes:
174
291
- "/var/run/docker.sock:/var/run/docker.sock"
175
292
```
293
+
294
+
### Start Chronos
295
+
296
+
Once you have configured and intialized Chronos Tracker, it will be automatically recording monitoring data when your servers are running. Finally, start the Chronos desktop app to view that data! After cloning our [GitHub repo](https://github.com/open-source-labs/Chronos), run `npm install` and `npm run both` to start Chronos. Alternatively, you can download an [executable for Mac](https://chronoslany.com/Chronos.dmg). Add your application in the Chronos app dashboard with the same URI you used in your Chronos Tracker configuration. Click on it and start monitoring!
297
+
176
298
#
177
299
###### Return to [Top](#Chronos)
178
300
<br>
@@ -266,9 +388,9 @@ Refer to the [README](link) in the `docker` folder for more details.
266
388
267
389
<br>
268
390
269
-
### Middleware Branch
391
+
### gRPC Branch
392
+
The **'gRPC'** branch is the current codebase for the <ahref="#"><imgsrc="./app/assets/npm-logo-color.png"alt="NPM"title="NPM"align="center"height="20" /></a> package, which is what you will install in your own application in order to use Chronos. Download the <ahref="#"><imgsrc="./app/assets/npm-logo-color.png"alt="NPM"title="NPM"align="center"height="20" /></a> package [here](https://www.npmjs.com/package/chronos-tracker).
270
393
271
-
The **'middleware'** branch is the current codebase for the <ahref="#"><imgsrc="./app/assets/npm-logo-color.png"alt="NPM"title="NPM"align="center"height="20" /></a> package, which is what you will install in your own application in order to use Chronos. Download the <ahref="#"><imgsrc="./app/assets/npm-logo-color.png"alt="NPM"title="NPM"align="center"height="20" /></a> package [here](https://www.npmjs.com/package/chronos-tracker).
272
394
<br>
273
395
274
396
#
@@ -286,7 +408,7 @@ The **'middleware'** branch is the current codebase for the <a href="#"><img src
0 commit comments