@contrast/config 1.47.0 → 1.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/common.js CHANGED
@@ -97,6 +97,7 @@ const mappings = {
97
97
  // server features
98
98
  'assess.enable': (remoteData) => remoteData.assess?.enable,
99
99
  'assess.probabilistic_sampling.enable': (remoteData) => remoteData.assess?.sampling?.enable,
100
+ 'assess.probabilistic_sampling.baseline': (remoteData) => remoteData.assess?.sampling?.baseline,
100
101
  'assess.probabilistic_sampling.base_probability': (remoteData) => {
101
102
  const request_frequency = remoteData.assess?.sampling?.request_frequency;
102
103
  if (request_frequency > 0) {
@@ -104,6 +105,7 @@ const mappings = {
104
105
  if (!isNaN(baseProbability)) return baseProbability;
105
106
  }
106
107
  },
108
+ 'assess.probabilistic_sampling.window_ms': (remoteData) => remoteData.assess?.sampling?.window_ms,
107
109
  'assess.stacktraces': (remoteData) => remoteData.assess?.report_stacktraces,
108
110
  'agent.logger.level': coerceLowerCase('logger.level'),
109
111
  'agent.logger.path': (remoteData) => remoteData.logger?.path,
package/lib/options.js CHANGED
@@ -578,6 +578,13 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
578
578
  fn: castBoolean,
579
579
  desc: 'Set to true to enable sampling of requests for dataflow and other Assess features',
580
580
  },
581
+ {
582
+ name: 'assess.probabilistic_sampling.baseline',
583
+ arg: '<baseline>',
584
+ default: 5,
585
+ fn: parseNum,
586
+ desc: 'This property indicates the number of requests to analyze in each window before sampling begins.',
587
+ },
581
588
  {
582
589
  // effective based on local config and 'assess.sampling' TeamServer DTM
583
590
  name: 'assess.probabilistic_sampling.base_probability',
@@ -596,6 +603,13 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
596
603
  default: 0.05,
597
604
  desc: 'A value p within the range [0, 1]. Each request will share same probability p of being sampled.',
598
605
  },
606
+ {
607
+ name: 'assess.probabilistic_sampling.window_ms',
608
+ arg: '<window_ms>',
609
+ default: 180_000,
610
+ fn: parseNum,
611
+ desc: 'This property indicates the duration for which a sample set is valid.',
612
+ },
599
613
  {
600
614
  name: 'assess.probabilistic_sampling.event_detail',
601
615
  arg: '<level>',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.47.0",
3
+ "version": "1.49.0",
4
4
  "description": "An API for discovering Contrast agent configuration data",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -17,11 +17,11 @@
17
17
  "node": ">= 16.9.1"
18
18
  },
19
19
  "scripts": {
20
- "test": "../scripts/test.sh"
20
+ "test": "bash ../scripts/test.sh"
21
21
  },
22
22
  "dependencies": {
23
- "@contrast/common": "1.32.0",
24
- "@contrast/core": "1.52.0",
23
+ "@contrast/common": "1.34.0",
24
+ "@contrast/core": "1.54.0",
25
25
  "yaml": "^2.2.2"
26
26
  }
27
27
  }