<PackageReference Include="Microsoft.ApplicationInsights" Version="3.0.0-beta1" />

Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration

public sealed class TelemetryConfiguration : IDisposable
Encapsulates the global telemetry configuration typically loaded from the ApplicationInsights.config file.
public string ConnectionString { get; set; }

Gets or sets the connection string.

public bool DisableTelemetry { get; set; }

Gets or sets a value indicating whether sending of telemetry to Application Insights is disabled.

Initializes a new instance of the TelemetryConfiguration class.

Creates a new TelemetryConfiguration instance loaded from the ApplicationInsights.config file. If the configuration file does not exist, the new configuration instance is initialized with minimum defaults needed to send telemetry to Application Insights.

public static TelemetryConfiguration CreateFromConfiguration(string config)

Creates a new TelemetryConfiguration instance loaded from the specified configuration.

public void ConfigureOpenTelemetryBuilder(Action<IOpenTelemetryBuilder> configure)

Allows extending the OpenTelemetry builder configuration.

public void Dispose()

Releases resources used by the current instance of the TelemetryConfiguration class.