Skip to content

Commit

Permalink
Update Default Subscription Filter Pattern (#66)
Browse files Browse the repository at this point in the history
Closes #65
  • Loading branch information
kolanos authored Feb 4, 2020
1 parent a0a6f43 commit de1f7c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion newrelic_lambda_cli/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from newrelic_lambda_cli.cliutils import failure
from newrelic_lambda_cli.functions import get_function

DEFAULT_FILTER_PATTERN = '?REPORT ?NR_LAMBDA_MONITORING ?"Task timed out"'


def get_subscription_filters(session, function_name):
"""Returns all the log subscription filters for the function"""
Expand All @@ -30,7 +32,7 @@ def create_subscription_filter(session, function_name, destination_arn):
return session.client("logs").put_subscription_filter(
logGroupName="/aws/lambda/%s" % function_name,
filterName="NewRelicLogStreaming",
filterPattern="NR_LAMBDA_MONITORING",
filterPattern=DEFAULT_FILTER_PATTERN,
destinationArn=destination_arn,
)
except botocore.exceptions.ClientError as e:
Expand Down

0 comments on commit de1f7c8

Please sign in to comment.