moleculer-jaeger
Moleculer metrics module for Jaeger.
Features
- 5 types sampler
- UDP sender
Install
$ npm install moleculer-jaeger
Usage
// moleculer.config.jsmoduleexports = // ... metrics: true // ... // services/metrics.jaeger.service.jsconst JaegerService = ; moduleexports = mixins: JaegerService settings: host: "jaeger-server" port: 6832 ;
Sampler configurations
More info: http://jaeger.readthedocs.io/en/latest/client_libraries/#sampling
Setup ConstSampler (default):
moduleexports = mixins: JaegerService settings: host: "jaeger-server" port: 6832 sampler: type: "Const" options: decision: 1 );
Setup RateLimitingSampler:
moduleexports = mixins: JaegerService settings: host: "jaeger-server" port: 6832 sampler: type: "RateLimiting" options: maxTracesPerSecond: 2 initBalance: 5 );
Setup ProbabilisticSampler:
moduleexports = mixins: JaegerService settings: host: "jaeger-server" port: 6832 sampler: type: "Probabilistic" options: samplingRate: 01 // 10% );
Setup GuaranteedThroughputSampler:
GuaranteedThroughputProbabilisticSampler is a sampler that leverages both probabilisticSampler and rateLimitingSampler. The rateLimitingSampler is used as a guaranteed lower bound sampler such that every operation is sampled at least once in a time interval defined by the lowerBound. ie a lowerBound of
1.0 / (60 * 10)
will sample an operation at least once every 10 minutes.
moduleexports = mixins: JaegerService settings: host: "jaeger-server" port: 6832 sampler: type: "GuaranteedThroughput" options: lowerBound: 01 samplingRate: 01 );
Setup RemoteControlledSampler:
moduleexports = mixins: JaegerService settings: host: "jaeger-server" port: 6832 sampler: type: "RemoteControlled" options: //... );
Settings
Property | Type | Default | Description |
---|---|---|---|
host |
String |
required | UDP Sender host option. |
port |
Number |
null |
UDP Sender port option. |
sampler |
Object |
null |
Sampler configuration. |
sampler.type |
String |
null |
Sampler type |
sampler.options |
any | required | |
options |
Object |
null |
Additional options for Jaeger.Tracer |
Actions
Methods
Test
$ npm test
In development with watching
$ npm run ci
License
The project is available under the MIT license.
Contact
Copyright (c) 2016-2018 MoleculerJS