Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

What does this PR do?

Adds health check support for Azure Kusto (Azure Data Explorer) using the Microsoft.Azure.Kusto.Data SDK.

Core Implementation:

  • KustoAvailableHealthCheck - Executes .show databases query via ICslQueryProvider to verify cluster connectivity
  • KustoAvailableOptions - Supports both connection string and cluster URI configuration with optional database name and timeout
  • KustoAvailableConfigure - Validates configuration (connection string/URI required, timeout >= -1, URI must be absolute)
  • DependencyInjectionExtensions.AddKustoAvailability() - Registers health check with default tags azure, kusto, adx

Usage:

builder.Services.AddHealthChecks()
    .AddKustoAvailability("cluster1", options =>
    {
        options.ConnectionString = "https://mycluster.kusto.windows.net";
        options.DatabaseName = "MyDatabase"; // optional
        options.Timeout = 1000; // ms, default 100
    });

Test Coverage:

  • Unit tests: DI validation, options validation, configuration binding (14 tests)
  • Integration tests: Testcontainers.Kusto with healthy/degraded/unhealthy scenarios (5 tests)

Technical Notes:

  • Uses global:: prefix for Kusto namespaces to avoid collision with NetEvolve.HealthChecks.Azure.Kusto namespace
  • Static health check method (no instance state required)
  • Disposes ICslQueryProvider in finally block

Why is it important?

Azure Kusto is a core data analytics service in Azure. Monitoring cluster connectivity is essential for applications depending on ADX for real-time analytics and telemetry.

Related issues

  • Closes #XX

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 172.19.0.1
  • analytics.localstack.cloud
    • Triggering command: /opt/code/localstack/.venv/bin/python -m localstack.runtime.main (dns block)
  • api.localstack.cloud
  • assets.localstack.cloud
  • localhost.localstack.cloud
  • s3.localhost.localstack.cloud
  • sbsfe.0
    • Triggering command: /Eventhubs_Emulator/Microsoft.Cloud.EventHub.Emulator.Host dotnet Microsoft.Cloud.EventHub.Emulator.Host.dll (dns block)
  • westus-0.in.applicationinsights.azure.com
    • Triggering command: /home/REDACTED/work/healthchecks/healthchecks/tests/NetEvolve.HealthChecks.Tests.Integration/bin/Debug/net9.0/NetEvolve.HealthChecks.Tests.Integration --internal-msbuild-node /tmp/ebeab8c89f844592849fac9f218b60bd (dns block)
    • Triggering command: /home/REDACTED/work/healthchecks/healthchecks/tests/NetEvolve.HealthChecks.Tests.Integration/bin/Debug/net8.0/NetEvolve.HealthChecks.Tests.Integration --internal-msbuild-node /tmp/3c884d81a05b4689a92ddc37b9856b9f (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>NetEvolve.HealthChecks.Azure.Kusto</issue_title>
<issue_description>### Project Name

Azure.Kusto

Project Description

Contains HealthChecks for Azure.Kusto, based on the nuget packages Microsoft.Azure.Kusto.Data.

TestContainer Package Required?

Yes

TestContainer Package Name

Testcontainers.Kusto

Required NuGet Dependencies

Microsoft.Azure.Kusto.Data

Validation Steps

  • Create project structure in src/NetEvolve.HealthChecks.<ProjectName>/
  • Add project to solution (dotnet sln HealthChecks.slnx add)
  • Add project reference to Test projects
  • Add required NuGet packages to Directory.Packages.props
  • Follow naming conventions from ADR decisions
  • Create README.md based on other projects
  • Create unit test folder in tests/NetEvolve.HealthChecks.Tests.Unit/<ProjectName>/
  • Create integration test folder in tests/NetEvolve.HealthChecks.Tests.Integration/<ProjectName>/
  • Add project reference to the solution file
  • Add project reference to existing test projects
  • Add TestContainer package if specified
  • Restore NuGet packages (dotnet restore HealthChecks.slnx)
  • Build the solution (dotnet build HealthChecks.slnx --no-restore)
  • Run tests for the new project (dotnet test HealthChecks.slnx --no-build)
  • Verify all tests pass successfully (>80% coverage recommended)
  • Comment on issue with build/test results
  • Create pull request linking to this issue

Additional Notes

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add health checks for Azure.Kusto project feat: Add Azure Kusto (ADX) health check Nov 11, 2025
Copilot AI requested a review from samtrion November 11, 2025 00:52
Copilot finished work on behalf of samtrion November 11, 2025 00:52
@samtrion samtrion added the type:feature Indicates a new feature or enhancement to be added. label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Indicates a new feature or enhancement to be added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NetEvolve.HealthChecks.Azure.Kusto

2 participants