Skip to content

Commit 3e5528b

Browse files
author
Peter Marton
committed
chore(package): initial commit
0 parents  commit 3e5528b

11 files changed

+2759
-0
lines changed

Diff for: .eslintrc.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
extends: airbnb-base
3+
env:
4+
node: true
5+
mocha: true
6+
es6: true
7+
parserOptions:
8+
sourceType: strict
9+
rules:
10+
generator-star-spacing:
11+
- 2
12+
- before: true
13+
after: true
14+
no-shadow: 0
15+
require-yield: 0
16+
no-param-reassign: 0
17+
comma-dangle:
18+
- error
19+
- never
20+
no-underscore-dangle: 0
21+
import/no-extraneous-dependencies:
22+
- 2
23+
- devDependencies: true
24+
import/order: 0
25+
no-new: 0
26+
no-console: 0
27+
func-names: 0
28+
no-unused-expressions: 0
29+
prefer-arrow-callback: 1
30+
no-use-before-define:
31+
- 2
32+
- functions: false
33+
space-before-function-paren:
34+
- 2
35+
- always
36+
max-len:
37+
- 2
38+
- 120
39+
- 2
40+
semi:
41+
- 2
42+
- never
43+
strict:
44+
- 2
45+
- global
46+
arrow-parens:
47+
- 2
48+
- always

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
coverage
3+
.nyc_output

Diff for: README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# opentracing-infrastructure-graph
2+
3+
Visualizing infrastructure topology via OpenTracing instrumentation.
4+
5+
## Requirements
6+
7+
- Docker
8+
9+
### Run Prometheus
10+
11+
Modify: `/prometheus-data/prometheus.yml`, replace `192.168.0.10` with your own host machine's IP.
12+
Host machine IP address: `ifconfig | grep 'inet 192'| awk '{ print $2}'`
13+
14+
```sh
15+
docker run -p 9090:9090 -v "$(pwd)/prometheus-data":/prometheus-data prom/prometheus -config.file=/prometheus-data/prometheus.yml
16+
```
17+
18+
Open Prometheus: [http://http://localhost:9090](http://http://localhost:9090/graph)
19+
20+
## Getting started
21+
22+
It will start three web servers and simulate a service call chain:
23+
`server1` calls `server2` and `server3` parallel.
24+
25+
```
26+
npm start
27+
curl http://localhost:3001
28+
```
29+
30+
## Metrics between services
31+
32+
### Throughput
33+
34+
Prometheus query:
35+
36+
```
37+
sum(rate(operation_duration_seconds_count{name="http_server"}[1m])) by (service, parent_service) * 60
38+
```
39+
40+
![Throughput between services](img/throuhput.png)
41+
42+
### 95th response time
43+
44+
Prometheus query:
45+
46+
```
47+
histogram_quantile(0.95, sum(rate(operation_duration_seconds_bucket{name="http_server"}[1m])) by (le, service, parent_service)) * 1000
48+
```
49+
50+
![95th response time between services](img/response time_95th.png)

Diff for: img/response time_95th.png

242 KB
Loading

Diff for: img/throuhput.png

337 KB
Loading

0 commit comments

Comments
 (0)