Jaa


TelemetryConfiguration.InstrumentationKey Property

Definition

Caution

InstrumentationKey based global ingestion is being deprecated. Use TelemetryConfiguration.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.

Gets or sets the default instrumentation key for the application.

public string InstrumentationKey { get; [System.Obsolete("InstrumentationKey based global ingestion is being deprecated. Use TelemetryConfiguration.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")] set; }
[<set: System.Obsolete("InstrumentationKey based global ingestion is being deprecated. Use TelemetryConfiguration.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")>]
member this.InstrumentationKey : string with get, set
Public Property InstrumentationKey As String

Property Value

Attributes

Exceptions

The new value is null.

Remarks

This instrumentation key value is used by default by all TelemetryClient instances created in the application. This value can be overwritten by setting the InstrumentationKey property of the Context.

Applies to