Summary
In this chapter, you learned about offering telemetry data from a microservice solution covering logging, metrics, and distributed tracing. With logging, you used high-performance, strongly typed logging to write information-level logs as well as errors. For metrics, you created custom metric data using the Meter
class with instruments created. For distributed tracing, you used the ActivitySource
and Activity
classes.
To monitor all this telemetry data, you used the .NET Aspire dashboard, Azure Application Insights, and Prometheus with Grafana.
In the next chapter, we’ll look into how to use metrics data to scale the services running with Azure Container Apps. We’ll find out about the memory and CPU usage of services using load tests we created in Chapter 10, combine this with metrics information from this chapter, learn about scaling services to be ready no matter how demand grows, and implement health checks to recover services when not healthy.