Cloud and Container Basics

In a system in which several services work together, you want to find out which services a single user request passed through, in what order, and how much time it spent in each. Among the data used for observability, which of the following is the most suitable?

  1. AMetrics (numeric time series such as CPU utilization and request counts)
  2. BLogs (records of events output by each service)
  3. CTraces (records of the path of one request and the time of each segment)
Show answer and explanation

Answer: C. Traces (records of the path of one request and the time of each segment)

Observability is the degree to which the internal state of a system can be inferred from the data it emits, and metrics, logs and traces are often named as the data for it. In tracing (distributed tracing), an identifier shared by the request is passed between services, and the start and end times of the processing segments (spans) in each service are recorded to reconstruct the path of one request and the breakdown of its time. Metrics suit detecting overall trends and anomalies, and logs suit detailed investigation of individual events, but traces are the most suitable for following the flow of one request across services. In practice, the trace identifier is also written into the logs, and the three are combined to find causes.

  • A. Metrics are aggregated numeric time series, suited to seeing overall trends and anomalies, but they do not show the path of one request.
  • B. Logs are records of individual events, separate for each service, so on their own they make it hard to connect the flow of one request.
  • C. Correct. A trace records the path and time of one request as it passes across services.
Practice this topic Back to topic

Books on Cloud and Container Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Cloud and Container Basics questions

  1. Among the Linux kernel features that make containers possible, which of the following correctly pairs namespaces and cgroups (control groups) with their roles?
  2. On a Linux host, Docker is used to start a container from an image based on a different distribution from the host, and uname -r (which shows the kernel release) and cat /etc/os-release (which shows information about the distribution) are run inside it. Which of the following correctly describes the results?
  3. Which of the following correctly describes the relationship between a container image and a container?
  4. Inside a container started from an image, the configuration file /etc/app.conf, which is part of the image, is modified. Which of the following correctly describes what happens with Docker's usual storage mechanism (such as overlay2)?
  5. To unpack a 500 MB archive, data.tar.gz, an image was built with the Dockerfile above. Although the archive was deleted in the same RUN after unpacking, the image remained larger by the size of the archive. Which of the following is the most appropriate pair of reason and remedy?