Keywords.TransfersOnly is not defined publicly for Activity tracing

Topics: Using
Jan 31, 2015 at 5:33 PM
Edited Jan 31, 2015 at 5:35 PM Recommends using System.Threading.Tasks.TplEventSource to enable tracking contexts across threads. It also recommends using Keywords.TransfersOnly, but this const isn't defined publicly anywhere. It is defined here:

Can someone correct the docs or provide the recommended way of tracing activities across thread contexts? Thanks.

        Type tplEtwProviderType = typeof(string).Assembly.GetType("System.Threading.Tasks.TplEtwProvider");
        Type keywordsType = tplEtwProviderType.GetNestedType("Keywords");
        FieldInfo taskTranfer = keywordsType.GetField("TaskTransfer");
        var fieldValue = taskTranfer.GetValue(null);


Other links that recommend Keywords.TransfersOnly: