Custom Tracking Records

This topic demonstrates how to create custom tracking records and populate them with data to be emitted along with the records.

Emitting Custom Tracking Records

Custom tracking records can be emitted from a code activity as shown in the following example.

protected override void Execute(CodeActivityContext context)
{
…
            CustomTrackingRecord customRecord = new CustomTrackingRecord("CustomEmailSentEvent");
            customRecord.Data.Add("SendTime", sendTime);
            context.Track(customRecord);
}

A CustomTrackingRecord is emitted in a code activity by invoking the Track method on the ActivityContext.

See also