serverless-newrelic-lambda-layers
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -80,2 +80,9 @@ "use strict"; | ||
} | ||
get javaNewRelicHandler() { | ||
if (this.config.javaNewRelicHandler && | ||
this.config.javaNewRelicHandler === "handleStreamsRequest") { | ||
return "handleStreamsRequest" /* handleStreamsRequest */; | ||
} | ||
return "handleRequest" /* handleRequest */; | ||
} | ||
get functions() { | ||
@@ -282,3 +289,5 @@ return Object.assign.apply(null, this.serverless.service | ||
"python3.7", | ||
"python3.8" | ||
"python3.8", | ||
"java11", | ||
"java8.al2" | ||
].indexOf(runtime) === -1; | ||
@@ -414,2 +423,5 @@ if (typeof runtime !== "string" || | ||
} | ||
if (["java11", "java8.al2"].indexOf(runtime) !== -1) { | ||
return `com.newrelic.java.HandlerWrapper::${this.javaNewRelicHandler}`; | ||
} | ||
return handler; | ||
@@ -416,0 +428,0 @@ } |
{ | ||
"name": "serverless-newrelic-lambda-layers", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Serverless plugin for NewRelic APM AWS Lambda layers.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -92,3 +92,14 @@ # serverless-newrelic-lambda-layers | ||
``` | ||
If your function's source is committed to version control, you can avoid committing your license key by including it in your serverless.yml as a variable. See [the Serverless docs on template variables](https://www.serverless.com/framework/docs/providers/aws/guide/variables/) for more information. | ||
#### `nrRegion` (required for EU; optional for US) | ||
If your New Relic account is based in the EU, make sure to specify your nrRegion in the custom block: | ||
```yaml | ||
custom: | ||
newRelic: | ||
nrRegion: 'eu' | ||
``` | ||
#### `linkedAccount` (optional) | ||
@@ -104,2 +115,3 @@ | ||
linkedAccount: your-linked-account-name | ||
``` | ||
@@ -294,2 +306,16 @@ #### `trustedAccountKey` (optional) | ||
#### `javaNewRelicHandler` (optional) | ||
**Java runtimes only**. Only required if you are implementing the `RequestStreamHandler` interface. | ||
Defaults to `RequestHandler` interface. | ||
#### Accepted inputs: | ||
- handleRequest | ||
- handleStreamsRequest | ||
```yaml | ||
custom: | ||
newRelic: | ||
javaNewRelicHandler: handleStreamsRequest | ||
``` | ||
## Supported Runtimes | ||
@@ -302,2 +328,3 @@ | ||
- nodejs12.x | ||
- nodejs14.x | ||
- python2.7 | ||
@@ -307,2 +334,4 @@ - python3.6 | ||
- python3.8 | ||
- java11 | ||
- java8.al2 | ||
@@ -309,0 +338,0 @@ ## Contributing |
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
71934
985
353