TelemetryContext Class

Definition

Represents a context for sending telemetry to the Application Insights service.

public ref class TelemetryContext sealed : Microsoft::VisualStudio::ApplicationInsights::DataContracts::IJsonSerializable
public sealed class TelemetryContext : Microsoft.VisualStudio.ApplicationInsights.DataContracts.IJsonSerializable
type TelemetryContext = class
    interface IJsonSerializable
Public NotInheritable Class TelemetryContext
Implements IJsonSerializable
Inheritance
TelemetryContext
Implements

Constructors

TelemetryContext()

Initializes a new instance of the TelemetryContext class.

Properties

Component

Gets the object describing the component tracked by this TelemetryContext.

Device

Gets the object describing the device tracked by this TelemetryContext.

InstrumentationKey

Gets or sets the default instrumentation key for all ITelemetry objects logged in this TelemetryContext.

Location

Gets the object describing a location tracked by this TelemetryContext.

Operation

Gets the object describing a operation tracked by this TelemetryContext.

Properties

Gets a dictionary of application-defined property values.

Session

Gets the object describing a user session tracked by this TelemetryContext.

User

Gets the object describing a user tracked by this TelemetryContext.

Explicit Interface Implementations

IJsonSerializable.Serialize(IJsonWriter)

Serializes this object in JSON format. This is used by Common Schema 2.0 data flow. Common Schema 4 does not use tags, and writes the iKey in TelemetryHelper:WriteEnvelopeProperties as it uses a different format

Extension Methods

GetInternalContext(TelemetryContext)

Returns TelemetryContext's Internal context.

Applies to