Share via


AsyncCausalityTracer 類別

定義

啟用跨非同步作業的追蹤控制流程。

public ref class AsyncCausalityTracer abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class AsyncCausalityTracer final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class AsyncCausalityTracer
Public Class AsyncCausalityTracer
繼承
Object Platform::Object IInspectable AsyncCausalityTracer
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

AsyncCausalityTracer 類別提供方法,讓您能夠建立、傳播和追蹤因果關係,因為控制流程跨越非同步作業。 因果是追蹤非同步和同步活動的抽象概念。 您可以使用收集的資料來開發適合偵錯的因果關係圖。 因果追蹤會針對 Windows (ETW) 使用事件追蹤來進行記錄。

方法

TraceOperationCompletion(CausalityTraceLevel, CausalitySource, Guid, UInt64, AsyncStatus)

表示先前建立的非同步作業已完成其所有非同步工作。

TraceOperationCreation(CausalityTraceLevel, CausalitySource, Guid, UInt64, String, UInt64)

記錄非同步作業的建立。

TraceOperationRelation(CausalityTraceLevel, CausalitySource, Guid, UInt64, CausalityRelation)

記錄目前執行中同步工作專案與其相關之特定非同步作業之間的關聯性。

TraceSynchronousWorkCompletion(CausalityTraceLevel, CausalitySource, CausalitySynchronousWork)

表示最近在追蹤SynchronousWorkCompletion 方法線上程上執行的同步工作專案已完成。

TraceSynchronousWorkStart(CausalityTraceLevel, CausalitySource, Guid, UInt64, CausalitySynchronousWork)

指出指定的非同步作業正在呼叫 TraceSynchronousWorkStart 方法的執行緒上排程同步工作。

事件

TracingStatusChanged

當用戶端開始接聽因果追蹤時引發。

適用於

另請參閱