@contrast/agentify
Advanced tools
Comparing version 1.19.3 to 1.20.0
@@ -19,4 +19,5 @@ /* | ||
const Module = require('module'); | ||
const { IntentionalError } = require('@contrast/common'); | ||
const ERROR_MESSAGE = 'A fatal agent installation error has occurred. The application will be run without instrumentation.'; | ||
const ERROR_MESSAGE = 'An error prevented the Contrast agent from installing. The application will be run without instrumentation.'; | ||
const DEFAULT_INSTALL_ORDER = [ | ||
@@ -48,2 +49,5 @@ 'reporter', | ||
require('@contrast/config')(core); | ||
if (core.config._errors?.length) { | ||
throw core.config._errors[0]; | ||
} | ||
require('@contrast/logger').default(core); | ||
@@ -55,2 +59,5 @@ | ||
require('@contrast/core/lib/app-info')(core); | ||
if (core.appInfo._errors?.length) { | ||
throw core.appInfo._errors[0]; | ||
} | ||
require('@contrast/core/lib/sensitive-data-masking')(core); | ||
@@ -134,11 +141,14 @@ require('@contrast/core/lib/is-agent-path')(core); | ||
// TODO: Consider proper UNINSTALLATION and normal startup w/o agent | ||
if (core.logger) { | ||
core.logger.error({ err }, ERROR_MESSAGE); | ||
} else { | ||
console.error(new Error(ERROR_MESSAGE, { cause: err })); | ||
} | ||
core.agentify = function agentify() { | ||
return core; | ||
}; | ||
// ignore intentional errors | ||
if (!(err instanceof IntentionalError)) { | ||
if (core.logger) { | ||
core.logger.error({ err }, ERROR_MESSAGE); | ||
} else { | ||
console.error(new Error(ERROR_MESSAGE, { cause: err })); | ||
} | ||
} | ||
} | ||
@@ -145,0 +155,0 @@ |
{ | ||
"name": "@contrast/agentify", | ||
"version": "1.19.3", | ||
"version": "1.20.0", | ||
"description": "Configures Contrast agent services and instrumentation within an application", | ||
@@ -20,13 +20,13 @@ "license": "SEE LICENSE IN LICENSE", | ||
"dependencies": { | ||
"@contrast/common": "1.17.0", | ||
"@contrast/config": "1.24.0", | ||
"@contrast/core": "1.28.0", | ||
"@contrast/common": "1.18.0", | ||
"@contrast/config": "1.25.0", | ||
"@contrast/core": "1.29.0", | ||
"@contrast/deadzones": "1.1.2", | ||
"@contrast/dep-hooks": "1.3.1", | ||
"@contrast/esm-hooks": "2.1.1", | ||
"@contrast/instrumentation": "1.4.0", | ||
"@contrast/esm-hooks": "2.2.0", | ||
"@contrast/instrumentation": "1.5.0", | ||
"@contrast/logger": "1.7.2", | ||
"@contrast/metrics": "1.3.0", | ||
"@contrast/metrics": "1.4.0", | ||
"@contrast/patcher": "1.7.1", | ||
"@contrast/reporter": "1.23.2", | ||
"@contrast/reporter": "1.24.0", | ||
"@contrast/rewriter": "1.4.2", | ||
@@ -33,0 +33,0 @@ "@contrast/scopes": "1.4.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25848
638
+ Added@contrast/common@1.18.0(transitive)
+ Added@contrast/config@1.25.0(transitive)
+ Added@contrast/core@1.29.0(transitive)
+ Added@contrast/esm-hooks@2.2.0(transitive)
+ Added@contrast/instrumentation@1.5.0(transitive)
+ Added@contrast/metrics@1.4.0(transitive)
+ Added@contrast/reporter@1.24.0(transitive)
- Removed@contrast/common@1.17.0(transitive)
- Removed@contrast/config@1.24.0(transitive)
- Removed@contrast/core@1.28.0(transitive)
- Removed@contrast/esm-hooks@2.1.1(transitive)
- Removed@contrast/instrumentation@1.4.0(transitive)
- Removed@contrast/metrics@1.3.0(transitive)
- Removed@contrast/reporter@1.23.2(transitive)
Updated@contrast/common@1.18.0
Updated@contrast/config@1.25.0
Updated@contrast/core@1.29.0
Updated@contrast/esm-hooks@2.2.0
Updated@contrast/metrics@1.4.0
Updated@contrast/reporter@1.24.0