Skip to content

Commit

Permalink
update message
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMothra committed May 24, 2022
1 parent f20c9a4 commit 8625a73
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static ILoggingBuilder AddApplicationInsights(this ILoggingBuilder builde
/// <param name="builder">The <see cref="ILoggingBuilder"/> to use.</param>
/// <param name="instrumentationKey">Application insights instrumentation key.</param>
/// <returns>Logging builder with Application Insights added to it.</returns>
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsights() overload to set TelemetryConfiguration.ConnectionString via Action<TelemetryConfiguration>. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsights() overload which accepts Action<TelemetryConfiguration> and set TelemetryConfiguration.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
public static ILoggingBuilder AddApplicationInsights(this ILoggingBuilder builder, string instrumentationKey)
{
if (builder == null)
Expand All @@ -54,7 +54,7 @@ public static ILoggingBuilder AddApplicationInsights(this ILoggingBuilder builde
/// <param name="instrumentationKey">Application insights instrumentation key.</param>
/// <param name="configureApplicationInsightsLoggerOptions">Action to configure ApplicationInsights logger.</param>
/// <returns>Logging builder with Application Insights added to it.</returns>
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsights() overload to set TelemetryConfiguration.ConnectionString via Action<TelemetryConfiguration>. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsights() overload which accepts Action<TelemetryConfiguration> and set TelemetryConfiguration.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
public static ILoggingBuilder AddApplicationInsights(
this ILoggingBuilder builder,
string instrumentationKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static IApplicationBuilder UseApplicationInsightsExceptionTelemetry(this
/// <param name="services">The <see cref="IServiceCollection"/> instance.</param>
/// <param name="instrumentationKey">Instrumentation key to use for telemetry.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use an AddApplicationInsightsTelemetry() overload to set ApplicationInsightsServiceOptions.ConnectionString via Action<ApplicationInsightsServiceOptions>. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsightsTelemetry() overload which accepts Action<ApplicationInsightsServiceOptions> and set ApplicationInsightsServiceOptions.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
public static IServiceCollection AddApplicationInsightsTelemetry(
this IServiceCollection services,
string instrumentationKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static partial class ApplicationInsightsExtensions
/// <param name="services">The <see cref="IServiceCollection"/> instance.</param>
/// <param name="instrumentationKey">Instrumentation key to use for telemetry.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use an AddApplicationInsightsTelemetryWorkerService() overload to set ApplicationInsightsServiceOptions.ConnectionString via Action<ApplicationInsightsServiceOptions>. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsightsTelemetryWorkerService() overload which accepts Action<ApplicationInsightsServiceOptions> and set ApplicationInsightsServiceOptions.ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
public static IServiceCollection AddApplicationInsightsTelemetryWorkerService(
this IServiceCollection services,
string instrumentationKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static IServiceCollection ConfigureTelemetryModule<T>(
/// <param name="endpointAddress">Sets telemetry endpoint address.</param>
/// <param name="instrumentationKey">Sets instrumentation key.</param>
/// <returns>The <see cref="IConfigurationBuilder"/>.</returns>
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use an AddApplicationInsightsSettings() overload to set ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]
[Obsolete("InstrumentationKey based global ingestion is being deprecated. Use the AddApplicationInsightsSettings() overload which accepts string ConnectionString. See https://github.com/microsoft/ApplicationInsights-dotnet/issues/2560 for more details.")]

This comment has been minimized.

Copy link
@cijothomas

cijothomas May 24, 2022

Contributor

I am not so sure if this is correct.

This comment has been minimized.

Copy link
@TimothyMothra

TimothyMothra May 24, 2022

Author Member

This one is correct. The other method has a connectionString parameter.

public static IConfigurationBuilder AddApplicationInsightsSettings(
this IConfigurationBuilder configurationSourceRoot,
string connectionString,
bool? developerMode = null,
string endpointAddress = null,
string instrumentationKey = null)

[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "We made a mistake here, but we can't remove it from the public API now.")]
public static IConfigurationBuilder AddApplicationInsightsSettings(this IConfigurationBuilder configurationSourceRoot, bool? developerMode = null, string endpointAddress = null, string instrumentationKey = null)
=> configurationSourceRoot.AddApplicationInsightsSettings(connectionString: null, developerMode: developerMode, endpointAddress: endpointAddress, instrumentationKey: instrumentationKey);
Expand Down

0 comments on commit 8625a73

Please sign in to comment.