Logs

The eleventh factor is related to application logs. Logs are the first important thing after the application itself. Without logs, your system is blind, the operational team is blind, there is no monitoring, and you won't be able to fix a single line of code, especially in a cloud infrastructure.

In a cloud environment, in our revolution, logs should change as well. A log file in the runtime execution environment is a stateful component. If the execution environment crashes, logs are gone.

Any event in your code generates a log entry, and this should be streamed out to a stateful backing service, which receives log events (from different applications) and stores them for later analysis and aggregation. There are plenty of free and open source tools that can be used to introspect the behavior of your applications over time, such as ELF, EFK, and Grafana.

Logs are also very important to trace the flow of a request/response transaction, which might bounce from service to service before it gets back to the issuer. Log tracing is an important aspect that a cloud-native application should provide and follow.

You may have heard about telemetry—what your event-stream log might carry as information and how it carries it. Monitoring is something related to application performance (also known as APM); telemetry is about what happened from a business point of view at a certain time (for example, which products are the most sold during lunch time).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset