Modern Distributed Tracing in .NET by Liudmila Molkova

Modern Distributed Tracing in .NET by Liudmila Molkova

Author:Liudmila Molkova
Language: eng
Format: epub, pdf
Publisher: Packt Publishing Pvt Ltd
Published: 2023-06-22T00:00:00+00:00


Questions

Let’s say you want to track the number of meme downloads (from our meme sample applications). Which telemetry signals would you choose? Why?

When reporting HTTP request duration, would you report it as a span, metric, or both?

How would you monitor the number of active application instances and the uptime?

8

Writing Structured and Correlated Logs

Distributed tracing is a great tool to describe and correlate operations, but sometimes, we need to record things such as callbacks and startup configurations, or conditionally write debug information. In this chapter, we’re going to explore logs – the oldest and most popular telemetry signal that can describe anything.

First, we’ll talk about logging use cases and discover different APIs available in .NET, and then we’ll focus on ILogger – a common logging façade. We’ll learn how to use it efficiently to write structured events. We’ll see how to export logs with OpenTelemetry and write rich queries over them. Finally, we’ll explore log sampling and cost-saving strategies.

In this chapter, you’ll learn the following:

When to write logs and which .NET API to use

How to write logs with the Microsoft.Extentions.Logging.ILogger class

How to capture and export logs with OpenTelemetry

Cost-management strategies with the OpenTelemetry Collector



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.