Skip to content

Commit

Permalink
Add comment on API keys
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhelle committed Oct 9, 2024
1 parent 4a141b1 commit 74c913f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Refitter/Analytics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ namespace Refitter;

public static class Analytics
{
// API keys are stored in the source code because I'm interested in how forks of this project are used.
private const string ExceptionlessApiKey = "pRql7vmgecZ0Iph6MU5TJE5XsZeesdTe0yx7TN4f";
private const string ApplicationInsightsConnectionString = "InstrumentationKey=470c204f-b460-493a-9e31-d9b2f5e25abb;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=0836c3ac-e8ac-4e0c-ade8-3e0fadb9b40c";
private static TelemetryClient telemetryClient = null!;

public static void Configure()
Expand All @@ -20,10 +23,10 @@ public static void Configure()

ExceptionlessClient.Default.Configuration.UseSessions();
ExceptionlessClient.Default.Configuration.SetVersion(typeof(GenerateCommand).Assembly.GetName().Version!);
ExceptionlessClient.Default.Startup("pRql7vmgecZ0Iph6MU5TJE5XsZeesdTe0yx7TN4f");
ExceptionlessClient.Default.Startup(ExceptionlessApiKey);

var configuration = TelemetryConfiguration.CreateDefault();
configuration.ConnectionString = "InstrumentationKey=470c204f-b460-493a-9e31-d9b2f5e25abb;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=0836c3ac-e8ac-4e0c-ade8-3e0fadb9b40c";
configuration.ConnectionString = ApplicationInsightsConnectionString;

telemetryClient = new TelemetryClient(configuration);
telemetryClient.Context.User.Id = SupportInformation.GetSupportKey();
Expand Down

0 comments on commit 74c913f

Please sign in to comment.