你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TelemetryConfiguration.InstrumentationKey 属性

定义

注意

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

获取或设置应用程序的默认检测密钥。

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

属性值

属性

例外

新值为 null。

注解

默认情况下,此检测密钥值由应用程序中创建的所有 TelemetryClient 实例使用。 可以通过设置 InstrumentationKeyContext属性来覆盖此值。

适用于