Skip to content

Commit

Permalink
Remove ApplicationInsightsConnectionString
Browse files Browse the repository at this point in the history
Remove now-obsolete `ApplicationInsightsConnectionString` configuration setting.
  • Loading branch information
martincostello committed Nov 26, 2023
1 parent b976035 commit a0309b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions src/LondonTravel.Skill/SkillConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ namespace MartinCostello.LondonTravel.Skill;
/// </summary>
public sealed class SkillConfiguration
{
/// <summary>
/// Gets or sets the ApplicationInsights connection string to use.
/// </summary>
public string ApplicationInsightsConnectionString { get; set; } = string.Empty;

/// <summary>
/// Gets or sets the URL for the skill API.
/// </summary>
Expand Down Expand Up @@ -53,7 +48,6 @@ public static SkillConfiguration CreateDefaultConfiguration()

return new SkillConfiguration()
{
ApplicationInsightsConnectionString = GetEnvironmentVariable("APPINSIGHTS_CONNECTIONSTRING"),
SkillApiUrl = GetEnvironmentVariable("SKILL_API_HOSTNAME"),
SkillId = GetEnvironmentVariable("SKILL_ID"),
TflApplicationId = GetEnvironmentVariable("TFL_APP_ID"),
Expand Down
3 changes: 1 addition & 2 deletions test/LondonTravel.Skill.Tests/FunctionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ protected virtual SkillConfiguration CreateConfiguration()
{
var config = SkillConfiguration.CreateDefaultConfiguration();

config.ApplicationInsightsConnectionString = "InstrumentationKey=my-application-insights-key;IngestionEndpoint=https://northeurope-0.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/";
config.SkillApiUrl = "https://londontravel.martincostello.local/";
config.SkillId = "my-skill-id";
config.TflApplicationId = "my-tfl-app-id";
Expand Down Expand Up @@ -136,7 +135,7 @@ private sealed class TestAlexaFunction(

protected override void ConfigureServices(IServiceCollection services)
{
services.AddLogging((builder) => builder.AddXUnit(this).SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Debug));
services.AddLogging((builder) => builder.AddXUnit(this).SetMinimumLevel(LogLevel.Debug));
services.AddSingleton(config);
services.AddSingleton<IHttpMessageHandlerBuilderFilter, HttpRequestInterceptionFilter>(
(_) => new HttpRequestInterceptionFilter(options));
Expand Down

0 comments on commit a0309b3

Please sign in to comment.