RequestTelemetry Class

Definition

Encapsulates information about a web request handled by the application.

public sealed class RequestTelemetry : Microsoft.ApplicationInsights.Extensibility.Implementation.OperationTelemetry, Microsoft.ApplicationInsights.DataContracts.ISupportSampling
Inheritance
RequestTelemetry
Implements

Inherited Members

Microsoft.ApplicationInsights.Extensibility.Implementation.OperationTelemetry

Remarks

You can send information about requests processed by your web application to Application Insights by passing an instance of the RequestTelemetry class to the TrackRequest(RequestTelemetry) method.

Constructors

RequestTelemetry()

Initializes a new instance of the RequestTelemetry class.

RequestTelemetry(String, DateTimeOffset, TimeSpan, String, Boolean)

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

Properties

Context

Gets the object that contains contextual information about the application at the time when it handled the request.

Duration

Gets or sets the amount of time it took the application to handle the request.

HttpMethod

Gets or sets the HTTP method of the request.

Id

Gets or sets Request ID.

Metrics

Gets a dictionary of application-defined request metrics.

Name

Gets or sets human-readable name of the requested page.

Properties

Gets a dictionary of application-defined property names and values providing additional information about this request.

ResponseCode

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

Sequence

Gets or sets the value that defines absolute order of the telemetry item.

Source

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

Success

Gets or sets a value indicating whether application handled the request successfully.

Timestamp

Gets or sets date and time when telemetry was recorded.

Url

Gets or sets request url (optional).

Explicit Interface Implementations

ITelemetry.Sanitize()

Sanitizes the properties based on constraints.

ISupportSampling.SamplingPercentage

Gets or sets data sampling percentage (between 0 and 100).

Extension Methods

IsDefined(Object)
IsNull(Object)
IsPrimitive(Object)