Skip to content

Commit

Permalink
Merge pull request #51 from newrelic/mrickard/GTSE-11763/arbitrary-la…
Browse files Browse the repository at this point in the history
…mbda-log-group-name

Allow setting Lambda log group prefix with env var
  • Loading branch information
mrickard authored Feb 8, 2022
2 parents 0ceb00a + abfaf02 commit de1f7c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ To install and configure the New Relic Cloudwatch Logs Lambda, [see our document

Additional notes:
* Some users in UTF-8 environments have reported difficulty with defining strings of `NR_TAGS` delimited by the semicolon `;` character. If this applies to you, you can set an alternative delimiter character as the value of `NR_ENV_DELIMITER`, and separate your `NR_TAGS` with that.
* Custom Lambda and VPC log groups can be set using the `NR_LAMBDA_LOG_GROUP_PREFIX` and `NR_VPC_LOG_GROUP_PREFIX` environment variables.

## Manual Deployment

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aws-log-ingestion"
version = "2.6.4"
version = "2.6.5"
description = ""
authors = ["New Relic <serverless@newrelic.com>"]
license = "Apache 2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
# Reserves a time buffer for logs to be formatted before being sent.
SESSION_MAX_PROCESSING_TIME = 1

LAMBDA_LOG_GROUP_PREFIX = "/aws/lambda"
LAMBDA_LOG_GROUP_PREFIX = os.getenv("NR_LAMBDA_LOG_GROUP_PREFIX", "/aws/lambda")
VPC_LOG_GROUP_PREFIX = os.getenv("NR_VPC_LOG_GROUP_PREFIX", "/aws/vpc/flow-logs")

LAMBDA_NR_MONITORING_PATTERN = re.compile(r'.*"NR_LAMBDA_MONITORING')
Expand Down

0 comments on commit de1f7c9

Please sign in to comment.