aws / amazon-cloudwatch-agent

CloudWatch Agent enables you to collect and export host-level metrics and logs on instances running Linux or Windows server.
MIT License
437 stars 199 forks source link

Set sampling rate in CloudWatch agent #1015

Open ShawneeY opened 8 months ago

ShawneeY commented 8 months ago

Is your feature request related to a problem? Please describe. A way to set sampling_rate in CloudWatch agent.

Previous feture_request was closed. It was suggested to implement sampling in application_code and leverage the added filters to mimic sampling logs.

Describe the solution you'd like First-class support of setting sampling_rate as part of the agent config file

Describe alternatives you've considered Implementing sampling in application_code by flagging sampled/unsampled logs; then instruct CWAgent to only include sampled log_lines via the filters configuration.

Additional context Support setting sampling rate is a common feature in log_systems. E.g. Sentry

ShawneeY commented 8 months ago

Also, what is the default sampling rate in CloudWatch ? is it 100% since cofiguring sampling_rate is not directly supported ?

okankoAMZ commented 8 months ago

Hi! Thank you for bringing this to our attention. I have created a feature request ticket for this.