server icon indicating copy to clipboard operation
server copied to clipboard

[SG-497] BEEEP - Health Checks API Project

Open gbubemismith opened this issue 3 years ago • 1 comments

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Dotnet core offers health checks middleware and a library that can be used to check the health of infrastructure app components. Health checks are exposed on {baseUrl}/{path configured} e.g localhost:4000/health/extended, having basic health checks on key infrastructure can be useful in knowing the overall health of an application by just accessing the exposed URL. I decided to add this to the API project with checks on IdentityServer, Database, and Development Mail Server to show how it can be used and the values it might provide. Health reports can also be published to DataDog, ApplicationInsights etc.

Code changes

This PR adds HealthCheckServices.cs extension class which configures the HealthCheck service and also registers infrastructures to be checked.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

gbubemismith avatar Sep 01 '22 21:09 gbubemismith

I think this is something that needs to be discussed with devops and cloudops first, if it adds anything that they don't already track, it's a lot of added dependencies so if we can get the data some other way that might be preferable.

Hinton avatar Sep 29 '22 10:09 Hinton

I would also like to disable the UI projects and focus on cloud for now, that should lower the number of dependencies this adds.

Hinton avatar Apr 13 '23 13:04 Hinton

Removed AC Team from reviewers, as the only changes are to our package-lock.json. Please request a new review if we need to review any substantive code, thanks!

eliykat avatar Jun 13 '23 23:06 eliykat