RequestTelemetry RequestTelemetry 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
type RequestTelemetry = class
    inherit OperationTelemetry
    interface ITelemetry
    interface ISupportProperties
    interface ISupportMetrics
    interface ISupportSampling
Public NotInheritable Class RequestTelemetry
Inherits OperationTelemetry
Implements ISupportSampling
Inheritance
RequestTelemetryRequestTelemetryRequestTelemetry
Implements

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. Learn more

Constructors

RequestTelemetry() RequestTelemetry() RequestTelemetry()

Initializes a new instance of the RequestTelemetry class.

RequestTelemetry(String, DateTimeOffset, TimeSpan, String, Boolean) RequestTelemetry(String, DateTimeOffset, TimeSpan, String, Boolean) 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 Context Context

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

Duration Duration Duration

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

Extension Extension Extension

Gets or sets gets the extension used to extend this telemetry instance using new strong typed object.

HttpMethod HttpMethod HttpMethod

Gets or sets the HTTP method of the request.

Id Id Id

Gets or sets Request ID.

Metrics Metrics Metrics

Gets a dictionary of application-defined request metrics. Learn more

Name Name Name

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

Properties Properties Properties

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

ResponseCode ResponseCode ResponseCode

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

Sequence Sequence Sequence

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

Source Source Source

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

StartTime StartTime StartTime

Gets or sets the start time of the operation.

(Inherited from OperationTelemetry)
Success Success Success

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

Timestamp Timestamp Timestamp

Gets or sets date and time when telemetry was recorded.

Url Url Url

Gets or sets request url (optional).

Methods

DeepClone() DeepClone() DeepClone()

Deeply clones a RequestTelemetry object.

Sanitize() Sanitize() Sanitize()

Allow to call OperationTelemetry.Sanitize method from child classes.

(Inherited from OperationTelemetry)
SerializeData(ISerializationWriter) SerializeData(ISerializationWriter) SerializeData(ISerializationWriter)

Explicit Interface Implementations

ISupportSampling.SamplingPercentage ISupportSampling.SamplingPercentage ISupportSampling.SamplingPercentage

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

ITelemetry.Sanitize() ITelemetry.Sanitize() ITelemetry.Sanitize()

Sanitizes the properties based on constraints.

Applies to