Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SG-497] BEEEP - Health Checks API Project #2237

Merged
merged 46 commits into from
Jun 26, 2023
Merged

Conversation

gbubemismith
Copy link
Member

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 gbubemismith requested a review from a team September 1, 2022 21:32
@Hinton
Copy link
Member

Hinton commented Sep 29, 2022

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 Hinton removed the request for review from a team September 29, 2022 10:46
@gbubemismith gbubemismith added the hold Hold this PR or item until later; DO NOT MERGE label Apr 7, 2023
@gbubemismith gbubemismith requested review from a team as code owners April 21, 2023 23:54
Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, super close. Just want to make sure it won't fail on SH installs when they probably won't have a lot of the various azure connection strings we have in cloud.

src/Api/Startup.cs Outdated Show resolved Hide resolved
src/SharedWeb/Health/HealthCheckServiceExtensions.cs Outdated Show resolved Hide resolved
@eliykat eliykat removed the request for review from a team June 13, 2023 23:33
@eliykat
Copy link
Member

eliykat commented Jun 13, 2023

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!

justindbaur
justindbaur previously approved these changes Jun 16, 2023
Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, great work!

@gbubemismith gbubemismith removed hold Hold this PR or item until later; DO NOT MERGE needs-qa labels Jun 26, 2023
@gbubemismith gbubemismith merged commit e96fc56 into master Jun 26, 2023
@gbubemismith gbubemismith deleted the SG-497/Health-checks branch June 26, 2023 19:04
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.

4 participants