Sitelet https://github.com/microsoft/ApplicationInsights-dotnet/issues/1944
Skip to content

How to set ConnectionString using ILogger? #1944

Description

We have an internal customer using ILogger, and they need to set the ConnectionString but it appears that we don't expose that in the ILogger SDK.

We have a constructor overload that would permit this, but it's currently set to private.

/// <summary>
/// Adds an ApplicationInsights logger named 'ApplicationInsights' to the factory.
/// </summary>
/// <param name="builder">The <see cref="ILoggingBuilder"/> to use.</param>
/// <param name="configureTelemetryConfiguration">Action to configure telemetry configuration.</param>
/// <param name="configureApplicationInsightsLoggerOptions">Action to configure ApplicationInsights logger.</param>
private static ILoggingBuilder AddApplicationInsights(
this ILoggingBuilder builder,
Action<TelemetryConfiguration> configureTelemetryConfiguration,
Action<ApplicationInsightsLoggerOptions> configureApplicationInsightsLoggerOptions)
{

I propose we set this to public to unblock this customer.

Cijo Thomas (@cijothomas) do you know of any workarounds?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions