File tree Expand file tree Collapse file tree
providers/httpTransaction Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ var config = {};
22
33config . collectInterval = process . env . TRACE_COLLECT_INTERVAL || 2 * 60 * 1000 ;
44config . sampleSize = 60 ;
5+ config . initialSampleRate = process . env . TRACE_INITIAL_SAMPLE_RATE || 50 ;
56
67config . collectorApi = process . env . TRACE_COLLECTOR_API_URL ||
78 'https://trace-collector-api.risingstack.com' ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ var microtime = require('microtime');
77
88var getNamespace = require ( 'continuation-local-storage' ) . getNamespace ;
99var wraps = require ( './wraps' ) ;
10+ var config = require ( '../../config' ) ;
1011
1112/*
1213 * @class HttpTransaction
@@ -21,7 +22,7 @@ function HttpTransaction(eventBus, options) {
2122
2223 this . apiKey = options . apiKey ;
2324 this . collectInterval = options . collectInterval ;
24- this . sampleRate = 50 ;
25+ this . sampleRate = config . initialSampleRate ;
2526 this . sampleSize = options . sampleSize ;
2627 this . partials = { } ;
2728 this . traces = [ ] ;
You can’t perform that action at this time.
0 commit comments