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

datadog-lambda-js

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datadog-lambda-js - npm Package Compare versions

Comparing version 3.29.0 to 3.30.0

dist/package.json

4

dist/handler.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handler = void 0;
var index_1 = require("./index");

@@ -7,2 +8,5 @@ // We reuse the function loading logic already inside the lambda runtime.

var load = require("/var/runtime/UserFunction").load;
if (process.env.DD_TRACE_DISABLED_PLUGINS === undefined) {
process.env.DD_TRACE_DISABLED_PLUGINS = "fs";
}
if (index_1.getEnvValue("DD_TRACE_ENABLED", "true").toLowerCase() === "true") {

@@ -9,0 +13,0 @@ // tslint:disable-next-line:no-var-requires

@@ -81,2 +81,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnvValue = exports.getTraceHeaders = exports.sendDistributionMetric = exports.sendDistributionMetricWithDate = exports.datadog = exports.defaultConfig = exports.defaultSiteURL = exports.mergeXrayTracesEnvVar = exports.lambdaTaskRootEnvVar = exports.datadogHandlerEnvVar = exports.enhancedMetricsEnvVar = exports.logInjectionEnvVar = exports.logForwardingEnvVar = exports.logLevelEnvVar = exports.siteURLEnvVar = exports.apiKeyKMSEnvVar = exports.apiKeyEnvVar = void 0;
var metrics_1 = require("./metrics");

@@ -83,0 +84,0 @@ var trace_1 = require("./trace");

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.APIClient = void 0;
var https_1 = __importDefault(require("https"));

@@ -8,0 +9,0 @@ var querystring_1 = __importDefault(require("querystring"));

@@ -23,2 +23,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Batcher = void 0;
/**

@@ -25,0 +26,0 @@ * Batcher joins metrics with matching properties.

@@ -23,2 +23,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.incrementErrorsMetric = exports.incrementInvocationsMetric = exports.getEnhancedMetricTags = exports.getRuntimeTag = void 0;
var arn_1 = require("../utils/arn");

@@ -25,0 +26,0 @@ var cold_start_1 = require("../utils/cold-start");

9

dist/metrics/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.incrementInvocationsMetric = exports.incrementErrorsMetric = exports.KMSService = exports.MetricsListener = void 0;
var listener_1 = require("./listener");
exports.MetricsListener = listener_1.MetricsListener;
Object.defineProperty(exports, "MetricsListener", { enumerable: true, get: function () { return listener_1.MetricsListener; } });
var kms_service_1 = require("./kms-service");
exports.KMSService = kms_service_1.KMSService;
Object.defineProperty(exports, "KMSService", { enumerable: true, get: function () { return kms_service_1.KMSService; } });
var enhanced_metrics_1 = require("./enhanced-metrics");
exports.incrementErrorsMetric = enhanced_metrics_1.incrementErrorsMetric;
exports.incrementInvocationsMetric = enhanced_metrics_1.incrementInvocationsMetric;
Object.defineProperty(exports, "incrementErrorsMetric", { enumerable: true, get: function () { return enhanced_metrics_1.incrementErrorsMetric; } });
Object.defineProperty(exports, "incrementInvocationsMetric", { enumerable: true, get: function () { return enhanced_metrics_1.incrementInvocationsMetric; } });
//# sourceMappingURL=index.js.map

@@ -39,2 +39,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.KMSService = void 0;
var utils_1 = require("../utils");

@@ -41,0 +42,0 @@ // In order to avoid the layer adding the 40mb aws-sdk to a deployment, (which is always available

@@ -59,2 +59,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.MetricsListener = void 0;
var util_1 = require("util");

@@ -61,0 +62,0 @@ var utils_1 = require("../utils");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.writeMetricToStdout = exports.buildMetricLog = void 0;
// Builds the string representation of the metric that will be written to logs

@@ -4,0 +5,0 @@ function buildMetricLog(name, value, metricTime, tags) {

@@ -34,2 +34,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isDistribution = exports.Distribution = void 0;
var Distribution = /** @class */ (function () {

@@ -36,0 +37,0 @@ function Distribution(name, points) {

@@ -42,2 +42,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Processor = void 0;
var promise_retry_1 = __importDefault(require("promise-retry"));

@@ -44,0 +45,0 @@ var utils_1 = require("../utils");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.awsXrayDaemonAddressEnvVar = exports.xrayTraceEnvVar = exports.xraySubsegmentNamespace = exports.xrayBaggageSubsegmentKey = exports.xraySubsegmentKey = exports.xraySubsegmentName = exports.samplingPriorityHeader = exports.parentIDHeader = exports.traceIDHeader = exports.Source = exports.SampleMode = void 0;
var SampleMode;

@@ -4,0 +5,0 @@ (function (SampleMode) {

@@ -30,2 +30,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.convertToAPMParentID = exports.convertToAPMTraceID = exports.convertToSampleMode = exports.convertTraceContext = exports.readStepFunctionContextFromEvent = exports.parseXrayTraceContextHeader = exports.readTraceContextFromXray = exports.readTraceFromEvent = exports.sendXraySubsegment = exports.generateXraySubsegment = exports.addXrayMetadata = exports.addStepFunctionContextToXray = exports.addTraceContextToXray = exports.extractTraceContext = void 0;
var bignumber_js_1 = require("bignumber.js");

@@ -32,0 +33,0 @@ var crypto_1 = require("crypto");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceListener = void 0;
var listener_1 = require("./listener");
exports.TraceListener = listener_1.TraceListener;
Object.defineProperty(exports, "TraceListener", { enumerable: true, get: function () { return listener_1.TraceListener; } });
//# sourceMappingURL=index.js.map

@@ -50,2 +50,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceListener = void 0;
var context_1 = require("./context");

@@ -70,3 +71,3 @@ var patch_http_1 = require("./patch-http");

},
enumerable: true,
enumerable: false,
configurable: true

@@ -73,0 +74,0 @@ });

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.unpatchConsole = exports.patchConsole = void 0;
var shimmer = __importStar(require("shimmer"));

@@ -11,0 +24,0 @@ var log_1 = require("../utils/log");

@@ -13,2 +13,21 @@ "use strict";

};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __read = (this && this.__read) || function (o, n) {

@@ -33,10 +52,4 @@ var m = typeof Symbol === "function" && o[Symbol.iterator];

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.unpatchHttp = exports.patchHttp = void 0;
var http_1 = __importDefault(require("http"));

@@ -136,3 +149,3 @@ var https_1 = __importDefault(require("https"));

}
var url = options.protocol + "//" + options.host + options.path;
var url = options.protocol + "//" + (options.host || options.hostname) + options.path;
var requestMessage = "HTTP " + options.method + " " + url + " " + headerMessage + "\n";

@@ -139,0 +152,0 @@ process.stdout.write(requestMessage);

@@ -14,2 +14,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceContextService = void 0;
var aws_xray_sdk_core_1 = require("aws-xray-sdk-core");

@@ -56,3 +57,3 @@ var utils_1 = require("../utils");

},
enumerable: true,
enumerable: false,
configurable: true

@@ -72,3 +73,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -80,3 +81,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -83,0 +84,0 @@ });

@@ -23,2 +23,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TracerWrapper = void 0;
var utils_1 = require("../utils");

@@ -46,3 +47,3 @@ var constants_1 = require("./constants");

},
enumerable: true,
enumerable: false,
configurable: true

@@ -49,0 +50,0 @@ });

@@ -19,2 +19,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.parseTagsFromARN = exports.parseLambdaARN = void 0;
function parseLambdaARN(arn, version) {

@@ -21,0 +22,0 @@ var _a;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._resetColdStart = exports.getColdStartTag = exports.didFunctionColdStart = exports.setColdStart = void 0;
var functionDidColdStart = true;

@@ -4,0 +5,0 @@ var isColdStartSet = false;

@@ -39,2 +39,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.promisifiedHandler = exports.wrap = void 0;
var log_1 = require("./log");

@@ -41,0 +42,0 @@ var serialize_error_1 = require("serialize-error");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogLevel = exports.setLogger = exports.setLogLevel = exports.logDebug = exports.logError = exports.Timer = exports.wrap = exports.setColdStart = exports.getColdStartTag = exports.didFunctionColdStart = void 0;
var cold_start_1 = require("./cold-start");
exports.didFunctionColdStart = cold_start_1.didFunctionColdStart;
exports.getColdStartTag = cold_start_1.getColdStartTag;
exports.setColdStart = cold_start_1.setColdStart;
Object.defineProperty(exports, "didFunctionColdStart", { enumerable: true, get: function () { return cold_start_1.didFunctionColdStart; } });
Object.defineProperty(exports, "getColdStartTag", { enumerable: true, get: function () { return cold_start_1.getColdStartTag; } });
Object.defineProperty(exports, "setColdStart", { enumerable: true, get: function () { return cold_start_1.setColdStart; } });
var handler_1 = require("./handler");
exports.wrap = handler_1.wrap;
Object.defineProperty(exports, "wrap", { enumerable: true, get: function () { return handler_1.wrap; } });
var timer_1 = require("./timer");
exports.Timer = timer_1.Timer;
Object.defineProperty(exports, "Timer", { enumerable: true, get: function () { return timer_1.Timer; } });
var log_1 = require("./log");
exports.logError = log_1.logError;
exports.logDebug = log_1.logDebug;
exports.setLogLevel = log_1.setLogLevel;
exports.setLogger = log_1.setLogger;
exports.LogLevel = log_1.LogLevel;
Object.defineProperty(exports, "logError", { enumerable: true, get: function () { return log_1.logError; } });
Object.defineProperty(exports, "logDebug", { enumerable: true, get: function () { return log_1.logDebug; } });
Object.defineProperty(exports, "setLogLevel", { enumerable: true, get: function () { return log_1.setLogLevel; } });
Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return log_1.setLogger; } });
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return log_1.LogLevel; } });
//# sourceMappingURL=index.js.map

@@ -14,2 +14,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.logError = exports.logDebug = exports.getLogLevel = exports.setLogLevel = exports.setLogger = exports.LogLevel = void 0;
var LogLevel;

@@ -16,0 +17,0 @@ (function (LogLevel) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProcessVersion = void 0;
function getProcessVersion() {

@@ -4,0 +5,0 @@ return process.version;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Timer = void 0;
/**

@@ -23,3 +24,3 @@ * Timer is used to get a promise that completes at a regular interval.

},
enumerable: true,
enumerable: false,
configurable: true

@@ -26,0 +27,0 @@ });

{
"name": "datadog-lambda-js",
"version": "3.29.0",
"version": "3.30.0",
"description": "Lambda client library that supports hybrid tracing in node js",

@@ -15,3 +15,4 @@ "main": "dist/index.js",

"lint": "tslint --project tsconfig.json",
"check-formatting": "prettier --check src/**"
"check-formatting": "prettier --check src/**",
"format": "prettier --write src/**"
},

@@ -23,12 +24,12 @@ "devDependencies": {

"@types/nock": "^11.1.0",
"@types/node": "^14.6.0",
"@types/node": "^14.6.2",
"@types/promise-retry": "^1.1.3",
"@types/shimmer": "^1.0.1",
"dd-trace": "0.24.1",
"jest": "^26.4.1",
"dd-trace": "0.25.1",
"jest": "^26.4.2",
"nock": "13.0.4",
"prettier": "^2.0.5",
"ts-jest": "^26.2.0",
"prettier": "^2.1.1",
"ts-jest": "^26.3.0",
"tslint": "^6.1.3",
"typescript": "^3.9.7"
"typescript": "^4.0.2"
},

@@ -35,0 +36,0 @@ "dependencies": {

@@ -29,2 +29,4 @@ # datadog-lambda-js

The `fs` module is disabled by default. If you want to enable it you have to set the environment variable `DD_TRACE_DISABLED_PLUGINS` to `''` or to a comma-separated list of the plugins you want to disable. See the full list of supported plugins [here](https://docs.datadoghq.com/tracing/compatibility_requirements/nodejs/).
### Trace & Log Correlation

@@ -31,0 +33,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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