[Draft] Add /admin/health/connectivity endpoint + connectivity health check (Network Troubleshooter prototype) - #11939
Draft
Evan (EvanR-Dev) wants to merge 2 commits into
Conversation
…draft) Prototype for the Flex Consumption Network Troubleshooter (Approach 1): - Add the /admin/health/connectivity route, tag-filtered on the connectivity tag, alongside /admin/health/live and /ready. - Add a SDK-free DnsConnectivityHealthCheck (host-owned), registered on the WebHost scope so it runs in validation mode as well as on a normal worker. - Add a test proving an extension-registered connectivity IHealthCheck in the ScriptHost (JobHost) scope flows through DynamicHealthCheckService's merge and the connectivity tag filter, with no host dependency on the extension SDK. DRAFT: demonstration for design discussion; not for merge. Co-authored-by: Dobby <dobby@microsoft.com>
Demonstrates the extension-owned connectivity model without forcing a Microsoft.Extensions.Diagnostics.HealthChecks dependency on extensions: - IConnectivityValidator (+ ConnectivityContext/ConnectivityResult): a plain contract an extension implements using its own SDK + connection resolution. Final home is Microsoft.Azure.WebJobs (both host and extensions already reference it); defined in the host here only to prototype the mechanism. - ConnectivityHealthCheck: host adapter that enumerates the app's triggers via IFunctionMetadataManager, matches each to a registered validator by trigger type, invokes it with the binding's connection + settings, and aggregates into a connectivity-tagged IHealthCheck. Keeps HealthChecks host-side, once. - Tests proving a registered validator is invoked with the binding connection and settings, that unhealthy results surface, and that triggers with no validator are skipped. Companion extension probe: Azure/azure-sdk-for-net#62329. DRAFT: demonstration for design discussion; not for merge. Co-authored-by: Dobby <dobby@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft — for design discussion, not for merge.
Prototype for the Flex Consumption Network Troubleshooter (host side of "Approach 1").
What this adds
/admin/health/connectivityroute (tag-filtered on theconnectivitytag), alongside/admin/health/liveand/ready.DnsConnectivityHealthCheck(host-owned), registered on the WebHost scope so it runs in validation mode as well as on a normal worker.IConnectivityValidatorabstraction (+ConnectivityContext/ConnectivityResult): a plain contract an extension implements with its own SDK + connection resolution — noMicrosoft.Extensions.Diagnostics.HealthChecksdependency on extensions. Final home isMicrosoft.Azure.WebJobs; prototyped in the host here.ConnectivityHealthCheckhost adapter: enumerates the app's triggers (IFunctionMetadataManager+BindingMetadata.Connection), matches each to a registered validator by trigger type, invokes it with the binding's connection + settings, and aggregates into aconnectivity-taggedIHealthCheck. Keeps HealthChecks host-side, once.DynamicHealthCheckService's merge + tag filter; and the adapter invokes registered validators with the right binding context.Why
Flex Consumption needs per-dependency connectivity checks run from the app's network context. This demonstrates building on the existing health-check framework: host-owned SDK-free checks plus extension-owned provider checks via
IConnectivityValidator, invoked on a validation-mode worker.Companion extension probe (Event Hubs): Azure/azure-sdk-for-net#62329.