This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Distributed tracing is a diagnostic technique that helps engineers localize failures andperformance issues within applications, especially those that may be distributed acrossmultiple machines or processes. This technique tracks requests through an applicationcorrelating together work done by different application components and separating it fromother work the application may be doing for concurrent requests. For example, a request to atypical web service might be first received by a load balancer, then forwarded to a web serverprocess, which then makes several queries to a database. Using distributed tracing allowsengineers to distinguish if any of those steps failed, how long each step took, and potentiallylogging messages produced by each step as it ran.
Note
The term 'tracing' can have multiple meanings in older .NET APIs. This document focuses on distributed tracing. For informationon logging and older tracing APIs, seeLogging and tracing.
Key .NET libraries are instrumented to produce distributed tracing information automatically. However, this information needs to be collected and stored so that it will be available for review later.Typically, app developers select a telemetry service that stores this trace information for them andthen use a corresponding library to transmit the distributed tracing telemetry to their chosenservice:
For more information, seeUnderstand distributed tracing concepts and the following guides:
For third-party telemetry collection services, follow the setup instructions provided by the vendor.
For a comprehensive list of activities built into .NET seeBuilt-in activities in .NET.
.NET libraries don't need to be concerned with how telemetry is ultimately collected, onlywith how it is produced. If you want consumers of your library to be able to see the work that it does detailed in a distributed trace, add distributed tracing instrumentation to support it.
For more information, seeUnderstand distributed tracing concepts and theAdding custom distributed trace instrumentation guide.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?