<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.DataContracts.RequestTelemetry

Encapsulates information about a web request handled by the application.
public string HttpMethod { get; set; }

Gets or sets the HTTP method of the request.

Gets item type for sampling evaluation.

public string ResponseCode { get; set; }

Gets or sets response code returned by the application after handling the request.

public string Source { get; set; }

Gets or sets the source for the request telemetry object. This often is a hashed instrumentation key identifying the caller.

public Uri Url { get; set; }

Gets or sets request url (optional).

Initializes a new instance of the RequestTelemetry class.

public RequestTelemetry(string name, DateTimeOffset startTime, TimeSpan duration, string responseCode, bool success)

Initializes a new instance of the RequestTelemetry class with the given name, startTime, duration, responseCode and success property values.