TraceTelemetry Class

Definition

Telemetry type used for log messages. Contains a time and message and optionally some additional metadata. Learn more

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

Constructors

TraceTelemetry()

Initializes a new instance of the TraceTelemetry class.

TraceTelemetry(String)

Initializes a new instance of the TraceTelemetry class.

TraceTelemetry(String, SeverityLevel)

Initializes a new instance of the TraceTelemetry class.

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.

Message

Gets or sets the message text. For example, the text that would normally be written to a log file line.

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

Sequence

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

SeverityLevel

Gets or sets Trace severity level.

Timestamp

Gets or sets date and time when event was recorded.

Methods

DeepClone()

Deeply clones a TraceTelemetry 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