Skip to content

Commit

Permalink
pr-fix: var name
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels committed Aug 1, 2024
1 parent 26f3beb commit bcb758f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class AppInsightsClient : ITelemetryQueryClient
{
private readonly LogsQueryClient _queryClient;
private readonly QueryTimeRange _timeRange;
private readonly string _resourceId;
private readonly string _workspaceId;

/// <summary>
/// Initializes a new instance of the <see cref="AppInsightsClient" /> class.
Expand All @@ -28,7 +28,7 @@ public AppInsightsClient(TestConfig config)
{
ServicePrincipal servicePrincipal = config.GetServicePrincipal();
_queryClient = new LogsQueryClient(new ClientSecretCredential(servicePrincipal.TenantId, servicePrincipal.ClientId, servicePrincipal.ClientSecret));
_resourceId = config["Arcus:ApplicationInsights:LogAnalyticsWorkspace:ResourceId"];
_workspaceId = config["Arcus:ApplicationInsights:LogAnalytics:WorkspaceId"];
_timeRange = new QueryTimeRange(TimeSpan.FromDays(1));
}

Expand Down Expand Up @@ -178,7 +178,7 @@ public async Task<ExceptionResult[]> GetExceptionsAsync()
private async Task<IReadOnlyCollection<LogsTableRow>> QueryLogsAsync(string query)
{
LogsQueryResult response = await _queryClient.QueryWorkspaceAsync(
_resourceId,
_workspaceId,
query,
timeRange: _timeRange,
new LogsQueryOptions { ServerTimeout = TimeSpan.FromSeconds(3) });
Expand Down
4 changes: 2 additions & 2 deletions src/Arcus.Observability.Tests.Integration/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"ApplicationInsights": {
"InstrumentationKey": "#{Arcus.Observability.ApplicationInsights.InstrumentationKey}#",
"LogAnalyticsWorkspace": {
"ResourceId": "#{Arcus.Observability.ApplicationInsights.LogAnalyticsWorkspace.ResourceId}#",
"LogAnalytics": {
"WorkspaceId": "#{Arcus.Observability.ApplicationInsights.LogAnalytics.WorkspaceId}#"
}
}
},
Expand Down

0 comments on commit bcb758f

Please sign in to comment.