Skip to content

Stop health check probes filling the request log - #44

Draft
paulcustance-al wants to merge 1 commit into
mainfrom
task/quieten-health-check-request-logs
Draft

paulcustance-al wants to merge 1 commit into
mainfrom
task/quieten-health-check-request-logs

Conversation

@paulcustance-al

Copy link
Copy Markdown
Contributor

The platform polls /health constantly and every probe was logging a request summary line, which buries everything else in the log stream.

Those drop to Verbose now, so nothing collects them by default but they can be switched back on if the probes themselves need looking at. Real requests and failures are untouched.

The level selection moved out of Program.cs into a named method in MiddlewareExtensions, which also picks up the response status code - the global exception handler deals with most failures before this middleware sees them, so a 500 arrives here with no exception attached and would otherwise be logged as Information.

The platform polls /health constantly and every probe was logging a
summary line. Those drop to Verbose now. Real requests and failures are
untouched.
@github-actions

Copy link
Copy Markdown

Test Results

77 tests  ±0   77 ✅ ±0   7s ⏱️ +2s
 5 suites ±0    0 💤 ±0 
 5 files   ±0    0 ❌ ±0 

Results for commit 6b9ca41. ± Comparison against base commit ab431fa.

@github-actions

Copy link
Copy Markdown

Summary

Summary
Generated on: 09/21/2026 - 15:12:08
Parser: MultiReport (5x Cobertura)
Assemblies: 4
Classes: 48
Files: 42
Line coverage: 72.2% (459 of 635)
Covered lines: 459
Uncovered lines: 176
Coverable lines: 635
Total lines: 1444
Branch coverage: 63.1% (101 of 160)
Covered branches: 101
Total branches: 160
Method coverage: Feature is only available for sponsors
Tag: 183_35617191751

Coverage

SchoolAccount.Collect.Api - 71.8%
Name Line Branch
SchoolAccount.Collect.Api 71.8% 58.8%
Program 95.2% 83.3%
SchoolAccount.Collect.Api.DependencyInjection 100% 100%
SchoolAccount.Collect.Api.Endpoints.Census.GetCensusActions.GetCensusAction
sEndpoint
100% 100%
SchoolAccount.Collect.Api.Endpoints.Census.GetCensusActions.GetCensusAction
sRequest
100%
SchoolAccount.Collect.Api.Endpoints.Organisations.GetByLaestab.GetByLaestab
Endpoint
100% 100%
SchoolAccount.Collect.Api.Endpoints.Shared.User 100% 75%
SchoolAccount.Collect.Api.Endpoints.Status.GetStatuses.GetStatusesEndpoint 100% 100%
SchoolAccount.Collect.Api.Endpoints.Status.GetStatuses.GetStatusesRequest 100% 100%
SchoolAccount.Collect.Api.Extensions.ConfigurationExtensions 0% 0%
SchoolAccount.Collect.Api.Extensions.EndpointExtensions 100% 92.8%
SchoolAccount.Collect.Api.Extensions.MiddlewareExtensions 88.8% 62.5%
SchoolAccount.Collect.Api.Extensions.ResultExtensions 50% 25%
SchoolAccount.Collect.Api.Infrastructure.CustomResults 0% 0%
SchoolAccount.Collect.Api.Infrastructure.GlobalExceptionHandler 8.3%
SchoolAccount.Collect.Api.Middleware.RequestContextLoggingMiddleware 100% 100%
SchoolAccount.Collect.Application - 85.2%
Name Line Branch
SchoolAccount.Collect.Application 85.2% 87.5%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandBaseHandler
0% 0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandBaseHandler
0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandHandler<TCommand, TResponse>
0% 0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.C
ommandHandler<TCommand, TResponse>
0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.Q
ueryHandler<TQuery, TResponse>
0% 0%
SchoolAccount.Collect.Application.Abstractions.Behaviors.LoggingDecorator.Q
ueryHandler<TQuery, TResponse>
0%
SchoolAccount.Collect.Application.Census.GetCensusActions.CensusActionsResp
onse
100%
SchoolAccount.Collect.Application.Census.GetCensusActions.CensusReturn 100%
SchoolAccount.Collect.Application.Census.GetCensusActions.GetCensusActionsH
andler
100% 100%
SchoolAccount.Collect.Application.Census.GetCensusActions.GetCensusActionsQ
uery
100%
SchoolAccount.Collect.Application.Census.GetCensusActions.StubbedCensusResp
onse
100% 100%
SchoolAccount.Collect.Application.Configuration.CensusSettingsValidator 100% 100%
SchoolAccount.Collect.Application.DependencyInjection 100% 100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.GetOrganisatio
nByLaestabQuery
100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.GetOrganisatio
nByLaestabQueryHandler
100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.LaestabValue 100% 100%
SchoolAccount.Collect.Application.Organisations.GetByLaestab.StatusCalculat
or
100% 100%
SchoolAccount.Collect.Application.Shared.UserDetails 100%
SchoolAccount.Collect.Application.Status.GetStatuses.GetStatusesQuery 100%
SchoolAccount.Collect.Application.Status.GetStatuses.GetStatusesQueryHandle
r
100% 100%
SchoolAccount.Collect.Application.Status.GetStatuses.GetStatusesRequestMode
l
100%
SchoolAccount.Collect.Application.Status.GetStatuses.OrganisationResponse 100%
SchoolAccount.Collect.Application.Status.GetStatuses.OrgDetails 100% 100%
SchoolAccount.Collect.Application.Status.GetStatuses.ReturnStatusMapper 100% 100%
SchoolAccount.Collect.Application.Status.GetStatuses.StatusResponse 100%
SchoolAccount.Collect.Application.Status.GetStatuses.StatusResponseBuilder 100% 100%
SchoolAccount.Collect.Infrastructure - 20.3%
Name Line Branch
SchoolAccount.Collect.Infrastructure 20.3% 16.6%
SchoolAccount.Collect.Infrastructure.Census.CensusReturnStatusReader 13.7% 16.6%
SchoolAccount.Collect.Infrastructure.DependencyInjection 100%
SchoolAccount.Collect.Infrastructure.Time.DateTimeProvider 0%
SchoolAccount.Collect.SharedKernel - 65.7%
Name Line Branch
SchoolAccount.Collect.SharedKernel 65.7% 31.2%
SchoolAccount.Collect.SharedKernel.Error 73.3%
SchoolAccount.Collect.SharedKernel.Result 54.5% 50%
SchoolAccount.Collect.SharedKernel.Result 80% 25%
SchoolAccount.Collect.SharedKernel.ValidationError 0% 0%

@paulcustance-al
paulcustance-al marked this pull request as draft September 21, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant