0.0.20 • Published 5 years ago

koa-c3po v0.0.20

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Summary

This is a simple framework based on koa that incorporates logging, instrumentation, and tracing by default.

Configuration

Configuration is done by default in yaml files. In the working directory the application will use config.yaml as the default profile and config-{profile}.yaml for other profiles. In addition the default config may also contain profile yaml segments as a multi-document yaml. If this is done all segments other than the default should contain a profile key to signify what profile it represents.

Values are retrieved in the following order, from lowest precedence to highest:

  • default values in app
  • values from the default config
  • values from a profile specific config (in order of precedence)
  • environment variables

For profiles they are listed in increasing order of precedence. As an example if profiles are "default,a,b" values in b will override values in a or default. If default is not listed it is added as the first element in the profile list.

Logging

Jaeger

Jaeger config is as follows:

jaeger:
  enabled: true
  config:
    serviceName: 'my-awesome-service'
    reporter:
      logSpans: true
      agentHost: 'localhost'
      agentPort: 6832
    sampler:
      type: 'probabilistic'
      param: 1.0    

TODO: add option section once implemented

For values see: https://github.com/jaegertracing/jaeger-client-node/blob/master/src/configuration.js#L37

Prometheus

TODO: Not much in the way of configuration but document once I surface

Running

PROFILES={comma separated profiles} A2R={example to run} node index.js

to run application 1:

PROFILES=logging,jaeger A2R="./example01/" ./build/nodejs/node-v8.10.0-linux-x64/bin/node index.js

to run application 2:

PROFILES=app2,logging,jaeger2 A2R="./example02/" ./build/nodejs/node-v8.10.0-linux-x64/bin/node index.js

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago