ITurnContextExtensions.TraceActivityAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends a trace activity to the BotAdapter for logging purposes.
public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> TraceActivityAsync (this Microsoft.Bot.Builder.ITurnContext turnContext, string name, object value = default, string valueType = default, string label = default, System.Threading.CancellationToken cancellationToken = default);
static member TraceActivityAsync : Microsoft.Bot.Builder.ITurnContext * string * obj * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function TraceActivityAsync (turnContext As ITurnContext, name As String, Optional value As Object = Nothing, Optional valueType As String = Nothing, Optional label As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)
Parameters
- turnContext
- ITurnContext
The context for the current turn.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
A task that represents the work queued to execute.
Remarks
If the adapter is being hosted in the Emulator, the task result contains a ResourceResponse object with the original trace activity's ID; otherwise, it contains a ResourceResponse object containing the ID that the receiving channel assigned to the activity.