-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwiring.yml
70 lines (70 loc) · 2.23 KB
/
wiring.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
components:
package: {module: './package.json'}
logger:
factory: '@utilitywarehouse/uw-lib-logger.js'
with:
- {name: '@package::name'}
instrumentation:
class: '@utilitywarehouse/uw-lib-prometheus.js'
call:
- method: newGauge
with: ['infrastructure_accessible', 'reports when infra is up/down', ['probe']]
- method: newGauge
with: ['healthcheck_status', 'reports healthcheck result', ['healthcheck_name', 'healthcheck_result']]
- method: newGauge
with: ['nodejs_memory_heap_used_bytes', 'process.memoryUsage().heapUsed']
- method: newGauge
with: ['nodejs_memory_heap_total_bytes', 'process.memoryUsage().heapTotal']
- method: newHistogram
with:
- 'http_request_seconds'
- 'Measures request duration'
- ['http_status', 'route', 'http_method']
- {buckets: [0.01, 0.03, 0.1, 0.2, 0.3, 0.5, 0.7, 1, 1.5, 2, 3, 5, 10]}
operational.about:
class: '@utilitywarehouse/uw-lib-operational.js::About'
call:
- {method: 'setMeta', with: ['@package::name', '@package::description']}
- {method: 'addOwner', with: ['@package::author']}
- {method: 'addLink', with: ['readme', '@package::homepage']}
operational.health:
class: '@utilitywarehouse/uw-lib-operational.js::Health'
with: ['@package::name', '@package::description']
operational.ready:
class: '@utilitywarehouse/uw-lib-operational.js::Ready'
router:
class: 'express::Router'
pre.router:
class: 'express::Router'
post.router:
class: 'express::Router'
server:
factory: 'express'
transport:
factory: 'http::createServer'
with: ['@server']
server.middleware:
factory: 'helmet'
bus:
class: 'director.js'
call:
- method: setRegistry
with: ['@canister']
system.lifecycle:
class: '__/lifecycle'
system.monitor.driver:
class: '@utilitywarehouse/uw-lib-connection-monitor.js'
system.monitor:
class: '__/monitor'
with:
- '@system.monitor.driver'
- '@logger'
- '@instrumentation'
- 'infrastructure_accessible'
- '@operational.health'
- '@canister'
- 'healthcheck_status'
tags:
system.start:
priority: 99999999
method: start