Share via


EventTelemetry Class

Definition

Telemetry type used to track custom events. Learn more

public sealed class EventTelemetry : Microsoft.ApplicationInsights.Channel.ITelemetry, Microsoft.ApplicationInsights.DataContracts.ISupportAdvancedSampling, Microsoft.ApplicationInsights.DataContracts.ISupportMetrics, Microsoft.ApplicationInsights.DataContracts.ISupportProperties
type EventTelemetry = class
    interface ITelemetry
    interface ISupportProperties
    interface ISupportAdvancedSampling
    interface ISupportSampling
    interface ISupportMetrics
Public NotInheritable Class EventTelemetry
Implements ISupportAdvancedSampling, ISupportMetrics, ISupportProperties, ITelemetry
Inheritance
EventTelemetry
Implements

Constructors

EventTelemetry()

Initializes a new instance of the EventTelemetry class.

EventTelemetry(String)

Initializes a new instance of the EventTelemetry class with the given name.

Properties

Context

Gets the context associated with the current telemetry item.

Extension

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

ItemTypeFlag

Gets item type for sampling evaluation.

Metrics

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

Name

Gets or sets the name of the event.

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

Sequence

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

Timestamp

Gets or sets date and time when event was recorded.

Methods

DeepClone()

Deeply clones a EventTelemetry object.

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). Should be 100/n where n is an integer. Learn more

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