DataDog / datadog-serverless-functions

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

Add TagFiltering Option with the DD Log Forwarder Parameters #791

Open green2jello opened 4 months ago

green2jello commented 4 months ago

Describe what happened: Currently when you set DdFetchLogGroupTags or DdFetchLambdaTags this will send ALL AWS tags on the log group / AWS lambda as part of the message to datadog. We would like a similar option to the optional Log Filtering Parameters that provide a regex of tags that we explicitly include, or explicitly exclude.

Describe what you expected: More control over which tags we send that are attached to resources. Tags for AWS that we use for cost analysis are not necessary to be sent with a whole log group and attached to each log message.

sumedham commented 4 months ago

Hi @green2jello, what's the underlying motivation for removing tags? Is it for ease-of-use and UX, or cost control purposes? Depending on that, we can look into finding a workaround or solution that works in this scenario.

billoneil commented 2 months ago

@sumedham My use case for this feature would be cost control. Adding unneeded tags on all spans and logs adds up on the bytes ingested.

green2jello commented 3 weeks ago

@sumedham . As mentioned by others, we would prefer not to send unneeded tags to Datadog, but we need said tags for AWS Billing and SCP purposes where resources are mandated to have tags for COST purposes, but not logging or metrics purposes.