Skip to content

Commit

Permalink
cleanup todos (#37913)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMothra authored Jul 28, 2023
1 parent e3661de commit 7ce62b8
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void Configure(AzureMonitorOptions options)

try
{
// TODO: should we replace this with IConfiguration?
string connectionString = Environment.GetEnvironmentVariable(ConnectionStringEnvironmentVariable);

if (!string.IsNullOrWhiteSpace(connectionString))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ internal static class ArrayExtensions
StringBuilder sb = new(input.Length);
foreach (var item in input)
{
// TODO: Consider changing it to JSon array.
if (item != null)
{
sb.Append(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ private static ApplicationInsightsRestClient InitializeRestClient(AzureMonitorEx
}
catch (Exception ex)
{
// TODO:
// Remove this when we add an option to disable offline storage.
// So if someone opts in for storage and we cannot initialize, we can throw.
// Change needed on persistent storage side to throw if not able to create storage directory.
// TODO: Should we throw if customer has opted for storage?
AzureMonitorExporterEventSource.Log.FailedToInitializePersistentStorage(connectionVars.InstrumentationKey, ex);

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ internal static class ResourceExtensions
}

// TODO: Check if service.name as unknown_service should be sent.
// (2023-07) we need to drop the "unknown_service."
if (serviceName != null && serviceNamespace != null)
{
azureMonitorResource.RoleName = string.Concat(serviceNamespace, "/", serviceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public override void OnEnd(Activity activity)
}

// TODO: other activity kinds
// (2023-07) fix before GA
}

private void ReportRequestDurationMetric(Activity activity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ internal AzureMonitorStatsbeat(ConnectionVars connectionStringVars, IPlatform pl

// Configure for attach statsbeat which has collection
// schedule of 24 hrs == 86400000 milliseconds.
// TODO: Follow up in spec to confirm the behavior
// in case if the app exits before 24hrs duration.
var exporterOptions = new AzureMonitorExporterOptions
{
DisableOfflineStorage = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void VerifyExceptionWithinActivity()
// ASSERT
Assert.True(telemetryItems.Any(), "Unit test failed to collect telemetry.");
this.telemetryOutput.Write(telemetryItems);
var activityTelemetryItem = telemetryItems.First(x => x.Name == "RemoteDependency"); // TODO: Change to Single(). Still investigating random duplicate export which only reproduces on build server.
var activityTelemetryItem = telemetryItems.First(x => x.Name == "RemoteDependency");

TelemetryItemValidationHelper.AssertActivity_As_DependencyTelemetry(
telemetryItem: activityTelemetryItem,
Expand Down

0 comments on commit 7ce62b8

Please sign in to comment.