You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TelemetryConfiguration
Setting InstrumentationKey via constructor or via property is marked Obsolete.
Use the default constructor and set the ConnectionString property instead.
TelemetryClient
Setting InstrumentationKey property is marked Obsolete.
Use the constructor to provide a TelemetryConfiguration with ConnectionString set.
Setting InstrumentationKey via AddApplicationInsights() extension method is marked Obsolete.
Use the overload which accepts Action<TelemetryConfiguration> and set TelemetryConfiguration.ConnectionString.
ApplicationInsightsServiceOptions
The InstrumentationKey property is marked Obsolete.
Use ConnectionString property instead.
ExtensionMethods
Setting InstrumentationKey via AddApplicationInsightsTelemetry() extension method is marked Obsolete.
Use the overload which accepts Action<ApplicationInsightsServiceOptions> and set ApplicationInsightsServiceOptions.ConnectionString.
Setting InstrumentationKey via AddApplicationInsightsTelemetryWorkerService() extension method is marked Obsolete.
Use the overload which accepts Action<ApplicationInsightsServiceOptions> and set ApplicationInsightsServiceOptions.ConnectionString.
Setting InstrumentationKey via AddApplicationInsightsSettings() extension method is marked Obsolete.
Use the overload which accepts string connectionString.
Config files
Users should refrain from setting the InstrumentationKey in text-based config files and instead set the ConnectionString.
TimothyMothra
changed the title
Mark InstrumentationKey based APIs as Obsolete
Announcement: InstrumentationKey based APIs are marked Obsolete.
May 24, 2022
Deprecating Instrumentation Key based SDK configuration in favor of Connection String.
More information:
Summary of Changes
Microsoft.ApplicationInsights
TelemetryConfiguration
Setting
InstrumentationKey
via constructor or via property is marked Obsolete.Use the default constructor and set the
ConnectionString
property instead.TelemetryClient
Setting
InstrumentationKey
property is marked Obsolete.Use the constructor to provide a
TelemetryConfiguration
withConnectionString
set.Microsoft.Extensions.Logging.ApplicationInsights
InstrumentationKey
viaAddApplicationInsights()
extension method is marked Obsolete.Use the overload which accepts
Action<TelemetryConfiguration>
and setTelemetryConfiguration.ConnectionString
.Microsoft.ApplicationInsights.AspNetCore and Microsoft.ApplicationInsights.WorkerService
ApplicationInsightsServiceOptions
The
InstrumentationKey
property is marked Obsolete.Use
ConnectionString
property instead.ExtensionMethods
Setting
InstrumentationKey
viaAddApplicationInsightsTelemetry()
extension method is marked Obsolete.Use the overload which accepts
Action<ApplicationInsightsServiceOptions>
and setApplicationInsightsServiceOptions.ConnectionString
.Setting
InstrumentationKey
viaAddApplicationInsightsTelemetryWorkerService()
extension method is marked Obsolete.Use the overload which accepts
Action<ApplicationInsightsServiceOptions>
and setApplicationInsightsServiceOptions.ConnectionString
.Setting
InstrumentationKey
viaAddApplicationInsightsSettings()
extension method is marked Obsolete.Use the overload which accepts
string connectionString
.Config files
Users should refrain from setting the
InstrumentationKey
in text-based config files and instead set theConnectionString
.ApplicationInsights.config
ASP.NET Core or Worker Service config:
For Comments or Questions
Please open a new issue.
The text was updated successfully, but these errors were encountered: