Skip to content

Commit

Permalink
add parameter DdLogLevel to DataDog Forwarder Lambda template to con…
Browse files Browse the repository at this point in the history
…trol DD_LOG_LEVEL environment variable
  • Loading branch information
GitMacke committed Oct 16, 2024
1 parent ef5859b commit 068410f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aws/logs_monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ To test different patterns against your logs, turn on [debug logs](#troubleshoot
### Advanced (optional)
`DdLogLevel`
: Control log level for the Datadog Forwarder Lambda function
`DdFetchLambdaTags`
: Let the Forwarder fetch Lambda tags using GetResources API calls and apply them to logs, metrics, and traces. If set to true, permission `tag:GetResources` will be automatically added to the Lambda execution IAM role.
Expand Down
7 changes: 7 additions & 0 deletions aws/logs_monitoring/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ Parameters:
Type: String
Default: ""
Description: Add custom tags to forwarded logs, comma-delimited string, no trailing comma, e.g., env:prod,stack:classic
DdLogLevel:
Type: String
Default: "INFO"
AllowedValues: ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
Description: Control log level for the Datadog Forwarder Lambda function
DdFetchLambdaTags:
Type: String
Default: true
Expand Down Expand Up @@ -406,6 +411,7 @@ Resources:
- !Ref DdTags
- !Ref AWS::NoValue
DD_TAGS_CACHE_TTL_SECONDS: !Ref TagsCacheTTLSeconds
DD_LOG_LEVEL: !Ref DdLogLevel
DD_FETCH_LAMBDA_TAGS: !If
- SetDdFetchLambdaTags
- !Ref DdFetchLambdaTags
Expand Down Expand Up @@ -967,6 +973,7 @@ Metadata:
- Label:
default: Advanced (Optional)
Parameters:
- DdLogLevel
- DdFetchLambdaTags
- DdFetchLogGroupTags
- DdFetchStepFunctionsTags
Expand Down

0 comments on commit 068410f

Please sign in to comment.