serverless-plugin-datadog
Advanced tools
Comparing version 2.10.0 to 2.10.1
{ | ||
"name": "serverless-plugin-datadog", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"description": "Serverless plugin to automatically instrument python and node functions with datadog tracing", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -14,3 +14,2 @@ import Service from "serverless/classes/Service"; | ||
injectLogContext: boolean; | ||
exclude: string[]; | ||
} | ||
@@ -17,0 +16,0 @@ export declare const defaultConfiguration: Configuration; |
@@ -17,3 +17,2 @@ "use strict"; | ||
const logInjectionEnvVar = "DD_LOGS_INJECTION"; | ||
const excludeEnvVar = "DD_EXCLUDED_FUNCTIONS"; | ||
exports.defaultConfiguration = { | ||
@@ -28,3 +27,2 @@ addLayers: true, | ||
injectLogContext: true, | ||
exclude: [], | ||
}; | ||
@@ -58,5 +56,2 @@ function setEnvConfiguration(config, service) { | ||
} | ||
if (config.exclude !== undefined && environment[excludeEnvVar] === undefined) { | ||
environment[excludeEnvVar] = config.exclude; | ||
} | ||
} | ||
@@ -63,0 +58,0 @@ exports.setEnvConfiguration = setEnvConfiguration; |
@@ -78,3 +78,3 @@ "use strict"; | ||
const defaultRuntime = this.serverless.service.provider.runtime; | ||
const handlers = layer_1.findHandlers(this.serverless.service, config.exclude, defaultRuntime); | ||
const handlers = layer_1.findHandlers(this.serverless.service, defaultRuntime); | ||
if (config.addLayers) { | ||
@@ -121,3 +121,3 @@ this.serverless.cli.log("Adding Lambda Layers to functions"); | ||
const defaultRuntime = this.serverless.service.provider.runtime; | ||
const handlers = layer_1.findHandlers(this.serverless.service, config.exclude, defaultRuntime); | ||
const handlers = layer_1.findHandlers(this.serverless.service, defaultRuntime); | ||
wrapper_1.redirectHandlers(handlers, config.addLayers); | ||
@@ -124,0 +124,0 @@ output_1.addOutputLinks(this.serverless, config.site); |
@@ -24,4 +24,4 @@ import { FunctionDefinition } from "serverless"; | ||
}; | ||
export declare function findHandlers(service: Service, exclude: string[], defaultRuntime?: string): FunctionInfo[]; | ||
export declare function findHandlers(service: Service, defaultRuntime?: string): FunctionInfo[]; | ||
export declare function applyLayers(region: string, handlers: FunctionInfo[], layers: LayerJSON): void; | ||
//# sourceMappingURL=layer.d.ts.map |
@@ -18,3 +18,3 @@ "use strict"; | ||
}; | ||
function findHandlers(service, exclude, defaultRuntime) { | ||
function findHandlers(service, defaultRuntime) { | ||
const funcs = service.functions; | ||
@@ -32,4 +32,3 @@ return Object.entries(funcs) | ||
}) | ||
.filter((result) => result !== undefined) | ||
.filter((result) => exclude === undefined || (exclude !== undefined && !exclude.includes(result.name))); | ||
.filter((result) => result !== undefined); | ||
} | ||
@@ -36,0 +35,0 @@ exports.findHandlers = findHandlers; |
{ | ||
"name": "serverless-plugin-datadog", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"description": "Serverless plugin to automatically instrument python and node functions with datadog tracing", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -38,3 +38,2 @@ # Datadog Serverless Plugin | ||
| `injectLogContext` | When set, the lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. | | ||
| `exclude` | When set, this plugin will ignore all specified functions. Use this parameter if you have any functions that should not include Datadog functionality. Defaults to `[]`. | | ||
@@ -56,4 +55,2 @@ To use any of these parameters, add a `custom` > `datadog` section to your `serverless.yml` similar to this example: | ||
injectLogContext: true | ||
exclude: | ||
- dd-excluded-function | ||
``` | ||
@@ -60,0 +57,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
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
312676
83
1772
135
2