Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Introduction to Tracing | Core Observability Techniques
Observability Fundamentals in DevOps

bookIntroduction to Tracing

Tracing is a core technique in DevOps that helps you follow the path of a request as it moves through different parts of a system. Imagine you are tracking a package as it travels from one city to another; tracing in software works in a similar way. Each step in the journey is recorded, so you can see exactly where the request goes and how long each part takes.

Tracing is important because modern applications often have many connected services working together. When something goes wrong or slows down, it can be hard to find out where the problem started. Tracing gives you a clear map of the request's journey, showing which service handled it, how long each step took, and where any delays happened.

By using tracing, you can:

  • Understand how requests travel through your system;
  • Spot slow or failing services that may cause issues;
  • Find performance bottlenecks and fix them quickly;
  • Gain confidence that your system is working as expected.

With tracing, you get a powerful tool to see inside your applications and keep them running smoothly.

Distributed Tracing vs. Local Tracing

Understanding the difference between distributed tracing and local tracing is essential for monitoring modern applications.

Local Tracing

Local tracing tracks the flow of requests or operations within a single service or application component. You use local tracing to:

  • Understand how a specific function, method, or module performs inside one service;
  • Identify bottlenecks or errors within a single process;
  • Debug code by following the path of a single request in one place.

Local tracing does not show how requests travel between different services or systems.

Distributed Tracing

Distributed tracing follows a request as it moves through multiple services or components in a system. You use distributed tracing to:

  • Track the full journey of a request across many services, databases, or APIs;
  • See how each service contributes to the overall response time;
  • Pinpoint where failures or delays occur in complex, multi-service environments.

Distributed tracing is critical in microservices and cloud-based systems, where requests often pass through many different technologies.

Key Differences

  • Scope: Local tracing focuses on one service; distributed tracing covers many services.
  • Visibility: Local tracing shows what happens inside a single process; distributed tracing shows the complete path across the system.
  • Use case: Use local tracing for debugging single components; use distributed tracing to understand and troubleshoot interactions between components.

By knowing when to use each type of tracing, you can more effectively monitor and improve your applications.

Example: Using a Trace to Find the Root Cause of a Slow Web Request

A user reports that your website's checkout page is very slow. You use tracing to follow the request as it moves through the system:

  1. The trace shows the request starts in the frontend-service;
  2. It then calls the order-service, which responds quickly;
  3. The order-service calls the payment-service, where there is a long delay;
  4. The trace highlights that the payment-service is waiting for the database for several seconds.

By following the trace, you see that the slowdown is caused by the payment-service waiting on the database. This helps you focus your troubleshooting on the database, instead of wasting time checking the frontend or other services.

question mark

What is the main purpose of tracing in observability?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 3

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain how tracing tools collect and display this information?

What are some popular tracing tools used in DevOps?

How can I set up tracing in my own application?

bookIntroduction to Tracing

Glissez pour afficher le menu

Tracing is a core technique in DevOps that helps you follow the path of a request as it moves through different parts of a system. Imagine you are tracking a package as it travels from one city to another; tracing in software works in a similar way. Each step in the journey is recorded, so you can see exactly where the request goes and how long each part takes.

Tracing is important because modern applications often have many connected services working together. When something goes wrong or slows down, it can be hard to find out where the problem started. Tracing gives you a clear map of the request's journey, showing which service handled it, how long each step took, and where any delays happened.

By using tracing, you can:

  • Understand how requests travel through your system;
  • Spot slow or failing services that may cause issues;
  • Find performance bottlenecks and fix them quickly;
  • Gain confidence that your system is working as expected.

With tracing, you get a powerful tool to see inside your applications and keep them running smoothly.

Distributed Tracing vs. Local Tracing

Understanding the difference between distributed tracing and local tracing is essential for monitoring modern applications.

Local Tracing

Local tracing tracks the flow of requests or operations within a single service or application component. You use local tracing to:

  • Understand how a specific function, method, or module performs inside one service;
  • Identify bottlenecks or errors within a single process;
  • Debug code by following the path of a single request in one place.

Local tracing does not show how requests travel between different services or systems.

Distributed Tracing

Distributed tracing follows a request as it moves through multiple services or components in a system. You use distributed tracing to:

  • Track the full journey of a request across many services, databases, or APIs;
  • See how each service contributes to the overall response time;
  • Pinpoint where failures or delays occur in complex, multi-service environments.

Distributed tracing is critical in microservices and cloud-based systems, where requests often pass through many different technologies.

Key Differences

  • Scope: Local tracing focuses on one service; distributed tracing covers many services.
  • Visibility: Local tracing shows what happens inside a single process; distributed tracing shows the complete path across the system.
  • Use case: Use local tracing for debugging single components; use distributed tracing to understand and troubleshoot interactions between components.

By knowing when to use each type of tracing, you can more effectively monitor and improve your applications.

Example: Using a Trace to Find the Root Cause of a Slow Web Request

A user reports that your website's checkout page is very slow. You use tracing to follow the request as it moves through the system:

  1. The trace shows the request starts in the frontend-service;
  2. It then calls the order-service, which responds quickly;
  3. The order-service calls the payment-service, where there is a long delay;
  4. The trace highlights that the payment-service is waiting for the database for several seconds.

By following the trace, you see that the slowdown is caused by the payment-service waiting on the database. This helps you focus your troubleshooting on the database, instead of wasting time checking the frontend or other services.

question mark

What is the main purpose of tracing in observability?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 3
some-alt