lumigo-io / lambda-telemetry-shipper

Ship your AWS lambda telemetry anywhere. The no-code style.
Apache License 2.0
7 stars 1 forks source link

Disable cloud watch logs conditionally for Telemetry API #2

Open bajajyog opened 1 year ago

bajajyog commented 1 year ago

Logs are still going to AWS cloud watch even after subscribing to AWS Lamabda Telemetry API.

I want extensions logs to still go to AWS cloud watch but not AWS Lambda function application logs.

Please advise, how to conditional disable cloud watch logs from AWS Lambda

saartochner-lumigo commented 1 year ago

Hi, Indeed, when subscribing to the AWS Lambda Telemetry API, the logs continue to be written to AWS CloudWatch. If you wish to prevent the lambda from writing logs to CloudWatch, the most straightforward approach is to remove its permissions. You can find more details here: https://stackoverflow.com/questions/51166504/disable-cloudwatch-to-monitor-logs-for-lambda-function

Currently, there is no direct way to block only a subset of logs from being written to CloudWatch. However, a more robust solution could be achieved using our extension: Just add CloudWatch as a new sink along with a filter on the logs. It should be easy and straightforward, and it will give you the desired behavior.

I hope this clarifies your options. If you have any further questions, feel free to ask. Thanks!