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

Simplify health check code in .NET Aspire hosting integrations. #6283

Open
mitchdenny opened this issue Oct 14, 2024 · 0 comments
Open

Simplify health check code in .NET Aspire hosting integrations. #6283

mitchdenny opened this issue Oct 14, 2024 · 0 comments
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-integrations Issues pertaining to Aspire Integrations packages
Milestone

Comments

@mitchdenny
Copy link
Member

mitchdenny commented Oct 14, 2024

At the moment most hosting integrations are wired up to listen for the ConnectionStringAvailableEvent to capture the connection string and then stuff that value into a captured variable which is shared with the health check registration code. This code is overly cumbersome and we would like to improve it.

The main issue is that typically most of the callbacks to configure clients on the health check registration methods are synchronous which means we can't get the connection string without doing sync over async.

We've filed this issue on the repo containing a lot of the health checks we are using:

Xabaril/AspNetCore.Diagnostics.HealthChecks#2306

That links to this PR which shows an example of the changes we are after applied to Redis:

Xabaril/AspNetCore.Diagnostics.HealthChecks#2305

@mitchdenny mitchdenny added this to the Backlog milestone Oct 14, 2024
@mitchdenny mitchdenny added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-integrations Issues pertaining to Aspire Integrations packages labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

No branches or pull requests

1 participant