Log Stream vs Log Group

I'm trying to set up Amazon Cloud Watch as a remote logging place for some of the C # apps I'm working on. The only thing that I don’t understand is the difference between the log group and the log stream, and how to use them?

I have several small applications that many different users will run on many computers. Therefore, I would like to be able to easily identify the source application and the machine for each log message.

My understanding is that a log stream is a sequence of log events that use the same source, "so it seems like I want to create a new log stream for each machine or each user on a machine. Does that sound right?

+6
source share
1 answer

It all depends on the level of aggregation you want:

  • If you define the instance as the source and set instance_id for the stream name, then you will have separate log streams for your instances.
  • If you define your application as a source and set, for example, "MyApp" as the name of the stream, then all instances on which the application is running will send log events to the same stream. You will be able to handle application log events together, generate metrics and create alarms for both.
+4
source

Source: https://habr.com/ru/post/974119/


All Articles