DataDog / datadog-serverless-functions

Repo of AWS Lambda and Azure Functions functions that process streams and send data to Datadog
Apache License 2.0
336 stars 378 forks source link

How to override cloudwatch source name #592

Open gentitope opened 2 years ago

gentitope commented 2 years ago

Describe what happened: I have an application logs from aws eks fargate pods and the logs is being pushed to cloudwatch. I have datadog log forwarder lamdda function that is forwarding the log to datadog but i cannot override the source name from cloudwatch to like nginx or java. Even though i set the (DdTags) to match expected source name but its not working.

Screenshot 2022-07-25 at 5 09 04 PM

How can i have do this?

Describe what you expected:

I want to be able to to override the cloudwatch source name.

Steps to reproduce the issue:

ghost commented 1 year ago

I also need this feature.

berniedurfee-renaissance commented 9 months ago

Same issue, but for RDS logs. The source is set to rds unless the engine name is in the Cloudwatch log group name. Unfortunately, the only way to make that happen is to update the instance names of all our DBs to include mysql in the name.

It'd be nice to set the source to mysql without having to rename DB instances.

Not sure of what that would look like, since the forwarder just reads from subscribed CW log streams. Maybe being able to provide a regex to source mapping to override the current parsing?

https://github.com/DataDog/datadog-serverless-functions/blob/80e7f42b376f66c8da0cb5fb8f8fcd334586caae/aws/logs_monitoring/parsing.py#L281