Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudWatchLogs line length limit

I was wondering if CLoudWatchLogs has a limit on the length of 1 line of logging. I checked the CloudWatchLogs Limit documentation page, but they do not specify anything regarding line length limit.

They do mention the Event size limit (256 KB) , which is the maximum size of 1 event, but that does not tell me anything about the length of the line. A log event can contain more information than only the @message field.

like image 729
Titulum Avatar asked Jun 19 '19 13:06

Titulum


People also ask

What is Putlogevents?

PDF. Uploads a batch of log events to the specified log stream. You must include the sequence token obtained from the response of the previous call. An upload in a newly created log stream does not require a sequence token.

Where are CloudWatch logs stored?

Flow logs are stored in an Amazon CloudWatch log group, in the same region as your Amazon Connect instance. This log group is created automatically when Enable flow logging is turned on for your instance. For example, the following image shows the CloudWatch log groups for two test instances.

What port does CloudWatch use?

Installing the CloudWatch agent on EC2 The following is an example of this configuration that listens on the default socket tcp:25888 .


1 Answers

Looking into this a bit (since I was curious about the same thing). The boto3 python client documentation refers to log lines as events. The event consists of the timestamp and the message. Within various AWS tools, the message can be broken into various fields, but I believe the timestamp and message are the only actual fields in the log event.

So this would suggest that about 256K is the maximum size for each line (minus the size of the timestamp and probably some overhead as well).

This is not to say that the AWS web console will handle lines that long well though.

like image 97
Tim Ludwinski Avatar answered Oct 06 '22 08:10

Tim Ludwinski