Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feature Request: Allow 'source' tag to be customized per AWS CloudWatch Log Group

Open
#712 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, python
Domain
cloud

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/datadog-serverless-functions

All issues in DataDog/datadog-serverless-functions

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.