Feature Request: Allow 'source' tag to be customized per AWS CloudWatch Log Group
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by locating the Python AWS Lambda entry point that derives Datadog source tags from CloudWatch Log Group names, then find its existing source-mapping tests or add coverage alongside them. Implement configuration for CW_LOGS_SOURCE_MAPPING_ values and verify that a matching group receives the configured source while existing mappings remain unchanged.
Written by the indexing model from the issue text.
Description
The source tag that's used for shipping logs to Datadog is based on a naming convention, where the name of the log group is mapped to a specific source tag.
My specific scenario is for RDS logs. The naming convention requires the engine (mysql, mariadb, etc.) to be included in the name of the DB instance for the source tag to be properly set to the DB engine.
If the engine is not part of the DB instance name, it won't appear in the Log Group name and the source will be set to rds, which is not parsed properly (or at all) by Datadog when the logs are ingested.
As a user, I'd like to be able to specify a mapping of source strings to CloudWatch Log Group names, matching the CloudWatch Log Group name.
For example, if the CloudWatch Log Group name is /aws/rds/instance/my-db-instance/error I want to be able to set the source tag to mysql so that the logs are parsed automatically by Datadog.
Implementation
One possible implementation would be to use an environment variable. For example, setting the following environment variable would configure the forwarder to work as described above:
CW_LOGS_SOURCE_MAPPING_MYSQL=/aws/rds/instance/my-db-instance
The code would look for environment variables starting with CW_LOGS_SOURCE_MAPPING_<SOURCE> for configuration. Where <SOURCE> is the desired value of the source tag (converted to lowercase).
The value of the environment variable is the string to match in the name of the CloudWatch Log Group.
This feature would allow the customization of the source tag (which is really important for proper parsing in Datadog) based on any CloudWatch Log Group name.
- Dominant language
- Python
- Stars
- 351
- Forks
- 394
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 11
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/datadog-serverless-functions
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DataDog/datadog-serverless-functions#1219 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
DataDog/datadog-serverless-functions#1187 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
DataDog/datadog-serverless-functions#1148 · 1 reaction ·
Maintainers usually reply within 1 day
-
Overriding environment variables that are reserved by AWS Lambda might lead to unexpected behavior.Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
DataDog/datadog-serverless-functions#1198 ·
Maintainers usually reply within 1 day
-
Support DD_TAGS on internal forwarder telemetry metricsPossibly taken @patbos claimed this 134 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
DataDog/datadog-serverless-functions#1145 ·
Maintainers usually reply within 1 day
All issues in DataDog/datadog-serverless-functions
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Graphify-Labs/graphify#4524 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
topoteretes/cognee#5982 ·
Maintainers usually reply within 1 day
-
Patches of derivations with `__structuredAttrs` are ignoredPossibly taken @KiaraGrouwstra claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
nix-community/vulnix#184 ·
-
New InternshipOpennew_internship
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
aws-samples/sample-per-model-bedrock#295 ·
Maintainers usually reply within 1 day