Skip to content

Commit

Permalink
Fixing default pattern definition to avoid double-wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
mrickard authored Feb 7, 2020
2 parents 7d509bf + 2cd61db commit e29eca4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import * as semver from "semver";
import * as Serverless from "serverless";
import * as util from "util";

const DEFAULT_FILTER_PATTERN =
'?REPORT ?NR_LAMBDA_MONITORING ?\\"Task timed out\\"';
const DEFAULT_FILTER_PATTERNS = [
"REPORT",
"NR_LAMBDA_MONITORING",
"Task timed out"
];

export default class NewRelicLambdaLayerPlugin {
public serverless: Serverless;
Expand Down Expand Up @@ -98,7 +101,7 @@ export default class NewRelicLambdaLayerPlugin {
return;
}
const funcs = this.functions;
let { cloudWatchFilter = [DEFAULT_FILTER_PATTERN] } = this.config;
let { cloudWatchFilter = [...DEFAULT_FILTER_PATTERNS] } = this.config;

let cloudWatchFilterString = "";
if (
Expand Down

0 comments on commit e29eca4

Please sign in to comment.