OK, MAUI devs, ICYMI here are the diagnostics and metrics tracking updates to .NET MAUI released with .NET 10 that you need to know!
The most important tool for making decisions is data: metrics, statistics and real numbers that tell you what you’re doing well and what you need to improve. Without them, you’re literally guessing.
Imagine going to the doctor for an eye exam and, when he arrives, he decides to give you a diagnosis without evaluating you, without tests, without anything.
Would you trust that result? Of course not. πβοΈ
But if that same doctor sends you for tests, evaluates, compares and explains exactly what’s going on? Then you’d feel more confident, because you know there’s real data behind the diagnosis.
The same thing happens with our applications: you can’t optimize, improve or fix what you can’t observe. If you don’t have metrics that tell you how often a screen fails, how long it takes to display its elements or where time is being lost during the layout cycle, you’re working blindly.
Having clear metrics not only helps you as a developer detect issues faster, but it also allows you to provide a better service to your users, because you can anticipate problems even before your user or client notices something is wrong.
In this article, we’ll talk about the new comprehensive diagnostics and metrics tracking for .NET MAUI—incredibly useful for identifying performance issues and understanding what’s really happening inside the layout cycle.
Before diving into diagnostics, it’s important to understand, at a high level, what .NET Aspire provides, because it’s the environment where you’ll be able to see your saved diagnostic data.
It’s a new application model in the .NET ecosystem, and .NET MAUI for .NET 10 now includes a project template that creates a .NET Aspire service defaults project.
This project introduces extension methods that automatically wire up telemetry and service discovery in your app. In practice, this means:
Microsoft added a full diagnostics and metrics system for .NET MAUI apps. Its main focus is monitoring layout performance—how views are measured and arranged on the screen—and it’s built on an extensible architecture that can easily support future observability features.
Basically, the core diagnostic infrastructure includes these three main points:
This is responsible for emitting activities (traces) when .NET MAUI performs layout operations. Thanks to this, we can know things like:
Measure() or Arrange() operation starts and endsIn summary, ActivitySource records every step of the layout process with detailed timing information.
β οΈ As important context:
Through a meter (a component of the .NET metrics system), this exposes metrics in different formats, such as:
Basically, metrics are responsible for providing the raw numbers needed to analyze performance.
This allows metrics to be enabled or disabled at runtime for AOT/trimming. In other words, it works like a switch that lets you turn your metrics collection system on or off depending on your needs.
Basically, this is where the most important UI operations—Measure() and Arrange()— are instrumented. In simple terms, it takes care of:
This means that .NET MAUI now injects internal measurements into these methods—as explained earlier.
When we talk about “instrumenting,” we mean adding metrics, logs, or traces inside the code so we can measure, monitor, diagnose or analyze how these operations behave.
It records how long each Measure() and Arrange() operation takes and how many times they were executed, and—most importantly—adds rich tags and context such as which screen it happened on, which layout triggered it and which view was involved. This gives you much more precision when diagnosing and resolving issues.
This means that all the instrumentation added to track Measure() and Arrange() is implemented using structs and a using pattern, so it generates zero heap allocations. In simple terms, the diagnostics system doesn’t create extra garbage or slow down your app while measuring performance. It records everything efficiently without impacting the UI’s responsiveness.
All the concepts explained above are ultimately exposed through a set of specific metrics:

Data from the official documentation.
Diagnostic Tags are labels automatically added by .NET MAUI to metrics and traces. Their purpose is to provide additional context about the view responsible for executing a Measure() or Arrange() operation.
In simple terms, these tags tell you which control triggered the operation, where it was located and its size.
The available tags are:
These apply to any view in .NET MAUI.
Tag: element.type — Full type name
Represents the full type name of the visual element that triggered the operation.
For example:
This tag helps you identify whether a specific control is causing multiple Measure() or Arrange() calls.
These tags are added to all controls that inherit from Element or VisualElement. They include:
Remember at the beginning of the article when we talked about .NET Aspire?
Well, that’s exactly where you can view all these metrics.
Below, I’ve included images from the official documentation so you can visualize how this looks in practice.


βοΈ If you want to dive deeper into the topic, I recommend checking out the pull request for “[v3] Add Diagnostics Metrics Tracking to MAUI Applications”.
And that’s it! π In this article, you explored how the new diagnostics system in .NET 10 enhances observability in .NET MAUI apps. You learned what each component does, how layout operations are instrumented, and how metrics are exposed so you can better understand your app’s performance.
Now you have the tools to make diagnostics your ally—helping you detect issues faster, optimize your UI more confidently and build apps that are both smoother and easier to maintain.
If you have any questions or want me to cover more related topics, feel free to leave a comment—I’d be happy to help you! π
See you in the next article! πβοΈβ¨
The explanation was based on the official documentation:
Leomaris Reyes is a Software Engineer from the Dominican Republic, with more than 5 years of experience. A Xamarin Certified Mobile Developer, she is also the founder of Stemelle, an entity that works with software developers, training and mentoring with a main goal of including women in Tech. Leomaris really loves learning new things! ππ You can follow her: Twitter, LinkedIn , AskXammy and Medium.