microsoft / microsoft/fhir-server

HealthCheck includes check for /metadata endpoint

Open
#2,331 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

VSTS-Backlog
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

  1. When I go to /health/check, then there is a check that /metadata is healthy.

Comments
Two possible approaches:

  1. Creates a healthcheck that has a dependency on IConformanceProvider, if await _provider.GetMetadata(cancellationToken) can be called successfully, the metadata's data is in a good place.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.