microsoft / microsoft/fhir-server
HealthCheck includes check for /metadata endpoint
Nobody has claimed this yet.
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
User story
HealthCheck should include a check that the /metadata endpoint is healthy. Misconfiguration or other issues that can potentially break metadata will leave the instance able to connect to the database, but otherwise unhealthy.
Acceptance criteria
- When I go to /health/check, then there is a check that /metadata is healthy.
Comments
Two possible approaches:
- Creates a healthcheck that has a dependency on
IConformanceProvider, ifawait _provider.GetMetadata(cancellationToken)can be called successfully, the metadata's data is in a good place. - Similar to BundleHandler, create a synthetic HTTP request to the metadata endpoint and check for 200 status
https://github.com/microsoft/fhir-server/blob/410600f34903bd7a9ff9a9ef525d4d5b1327fbdb/src/Microsoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandler.cs#L392
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing /health/check implementation and read BundleHandler.cs around line 392, the only referenced file. Compare the two proposed approaches: calling IConformanceProvider.GetMetadata(cancellationToken) or issuing a synthetic request to /metadata. Done means /health/check reports a healthy metadata check when /metadata returns successfully.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100