共用方式為


ApplicationInsightsDataClientExtensions.GetEventAsync Method

Definition

Get an event

public static System.Threading.Tasks.Task<Microsoft.Azure.ApplicationInsights.Models.EventsResults> GetEventAsync (this Microsoft.Azure.ApplicationInsights.IApplicationInsightsDataClient operations, Microsoft.Azure.ApplicationInsights.Models.EventType eventType, string eventId, TimeSpan? timespan = default, System.Threading.CancellationToken cancellationToken = default);
static member GetEventAsync : Microsoft.Azure.ApplicationInsights.IApplicationInsightsDataClient * Microsoft.Azure.ApplicationInsights.Models.EventType * string * Nullable<TimeSpan> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ApplicationInsights.Models.EventsResults>
<Extension()>
Public Function GetEventAsync (operations As IApplicationInsightsDataClient, eventType As EventType, eventId As String, Optional timespan As Nullable(Of TimeSpan) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of EventsResults)

Parameters

operations
IApplicationInsightsDataClient

The operations group for this extension method.

eventType
EventType

The type of events to query; either a standard event type (traces, customEvents, pageViews, requests, dependencies, exceptions, availabilityResults) or $all to query across all event types. Possible values include: '$all', 'traces', 'customEvents', 'pageViews', 'browserTimings', 'requests', 'dependencies', 'exceptions', 'availabilityResults', 'performanceCounters', 'customMetrics'

eventId
String

ID of event.

timespan
Nullable<TimeSpan>

Optional. The timespan over which to retrieve events. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the Odata expression.

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

Gets the data for a single event

Applies to