Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elastic-apm-node

Package Overview
Dependencies
Maintainers
0
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-apm-node - npm Package Compare versions

Comparing version 4.9.0 to 4.10.0

18

lib/agent.js

@@ -27,2 +27,3 @@ /*

const { elasticApmAwsLambda } = require('./lambda');
const logging = require('./logging');
const Metrics = require('./metrics');

@@ -321,2 +322,19 @@ const parsers = require('./parsers');

if (!logging.isLoggerCustom(this.logger)) {
// Periodically dump the current config (delta from defaults) when logging
// at "trace"-level. This allows getting the effective config from a running
// agent by setting trace-level logging and getting 1 minute of logs.
// (Sometimes getting logs from application *start* is no possible.)
setInterval(() => {
if (this.logger.isLevelEnabled('trace')) {
try {
const currConfig = this._conf.getCurrConfig();
this.logger.trace({ currConfig }, 'currConfig');
} catch (err) {
this.logger.trace({ err }, 'error calculating currConfig');
}
}
}, 60 * 1000).unref();
}
if (isPreviewVersion) {

@@ -323,0 +341,0 @@ this.logger.warn(

2

lib/apm-client/apm-client.js

@@ -73,2 +73,4 @@ /*

logging.setLogLevel(agent.logger, value);
// Hackily also set the HttpApmClient._log level.
logging.setLogLevel(client._log, value);
agent.logger.info(

@@ -75,0 +77,0 @@ `Central config success: updated logger with new logLevel: ${value}`,

@@ -37,2 +37,3 @@ /*

readEnvOptions,
CENTRAL_CONFIG_OPTS,
} = require('./schema');

@@ -248,2 +249,23 @@

}
// Returns an object showing the current config, excluding default values.
getCurrConfig() {
const currConfig = {};
// Start with the values from the logging preamble. This selected keys
// that were specified, and handles redaction.
for (let [k, v] of Object.entries(this.loggingPreambleData.config)) {
currConfig[k] = v.value;
}
// Then add the current value of any var possibly set by central config.
currConfig.centralConfig = this.centralConfig;
if (this.centralConfig) {
for (let k of Object.values(CENTRAL_CONFIG_OPTS)) {
currConfig[k] = this[k];
}
}
return currConfig;
}
}

@@ -250,0 +272,0 @@

@@ -748,2 +748,6 @@ /*

) {
agent.logger.debug(
{ trans: transaction.id, trace: transaction.traceId },
'dropping unsampled transaction',
);
return;

@@ -750,0 +754,0 @@ }

@@ -91,2 +91,3 @@ /*

trace: this.traceId,
sampled: this.sampled,
name: this.name,

@@ -93,0 +94,0 @@ type: this.type,

2

package.json
{
"name": "elastic-apm-node",
"version": "4.9.0",
"version": "4.10.0",
"description": "The official Elastic APM agent for Node.js",

@@ -5,0 +5,0 @@ "type": "commonjs",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc