@contrast/agentify 1.4.0 → 1.4.1

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.
Files changed (2) hide show
  1. package/lib/index.js +8 -2
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -137,12 +137,18 @@ class Agent {
137
137
  }
138
138
 
139
139
  logDiagnosticFiles() {
140
- const { config, getEffectiveConfig, getSystemInfo } = this.core;
140
+ const { agentName, agentVersion, config, getEffectiveConfig, getSystemInfo } = this.core;
141
141
 
142
142
  if (config.agent.diagnostics.enable !== false) {
143
143
  const effectiveConfig = JSON.stringify(getEffectiveConfig(), null, 2).concat('\n\n');
144
- const systemInfo = JSON.stringify(getSystemInfo(), null, 2).concat('\n\n');
145
144
 
145
+ let systemInfo = getSystemInfo();
146
+ systemInfo.Contrast.Agent = {
147
+ Name: agentName,
148
+ Version: agentVersion,
149
+ };
150
+
151
+ systemInfo = JSON.stringify(systemInfo, null, 2).concat('\n\n');
146
152
  if (!config.agent.diagnostics.quiet) {
147
153
  fs.writeFileSync(1, effectiveConfig, 'utf8');
148
154
  fs.writeFileSync(1, systemInfo, 'utf8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agentify",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Configures Contrast agent services and instrumentation within an application",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -16,4 +16,4 @@
16
16
  "scripts": {
17
17
  "test": "../scripts/test.sh"
18
18
  }
19
- }
19
+ }