다음을 통해 공유


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

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.

Extension

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

HttpMethod
Obsolete.

Gets or sets the HTTP method of the request.

Id

Gets or sets Request ID.

ItemTypeFlag

Gets item type for sampling evaluation.

Metrics

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

Name

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

ProactiveSamplingDecision

Gets or sets a value indicating whether item sampling decision was made pro-actively and result of this decision.

Properties

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

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.

StartTime
Obsolete.

Gets or sets the start time of the operation.

(Inherited from OperationTelemetry)
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).

Methods

DeepClone()

Deeply clones a RequestTelemetry object.

Sanitize()

Allow to call OperationTelemetry.Sanitize method from child classes.

(Inherited from OperationTelemetry)
SerializeData(ISerializationWriter)

Writes serialization info about the data class of the implementing type using the given ISerializationWriter.

Explicit Interface Implementations

ISupportSampling.SamplingPercentage

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

ITelemetry.Sanitize()

Sanitizes the properties based on constraints.

Extension Methods

GetEnvelopeName(ITelemetry)

Gets envelope name for ITelemetry object.

TrySetEnvelopeName(ITelemetry, String)

Sets envelope name for ITelemetry object.

Applies to