Atc.Aspire.Azure.Kusto
1.2.0
dotnet add package Atc.Aspire.Azure.Kusto --version 1.2.0
NuGet\Install-Package Atc.Aspire.Azure.Kusto -Version 1.2.0
<PackageReference Include="Atc.Aspire.Azure.Kusto" Version="1.2.0" />
paket add Atc.Aspire.Azure.Kusto --version 1.2.0
#r "nuget: Atc.Aspire.Azure.Kusto, 1.2.0"
// Install Atc.Aspire.Azure.Kusto as a Cake Addin #addin nuget:?package=Atc.Aspire.Azure.Kusto&version=1.2.0 // Install Atc.Aspire.Azure.Kusto as a Cake Tool #tool nuget:?package=Atc.Aspire.Azure.Kusto&version=1.2.0
Introduction
The Atc.Aspire.Azure.Kusto
package provides an Aspire Client Integration for Azure Data Explorer (Kusto), wrapping the Atc.Kusto package. It simplifies integration by providing configuration-driven setup and health checks.
Table of Content
Getting Started
Installation
Install the package via NuGet:
dotnet add package Atc.Aspire.Azure.Kusto
Wire-Up
Register the Azure Data Explorer client in your Program.cs:
builder.ConfigureAzureDataExplorer("kusto");
This will configure the integration using the ConnectionStrings:kusto entry in your application configuration.
Usage
After registration, you can inject IKustoProcessor into your services:
For more information on consuming the IKustoProcessor, refer to the Atc.Kusto documentation.
public class MyService(IKustoProcessor kustoProcessor)
{
public async Task ProcessQueryAsync()
{
var result = await processor.ExecuteQuery(
new TodoQuery(),
cancellationToken);
Console.WriteLine(result);
}
}
Configuration
Using a Connection String
Provide the Kusto connection string under ConnectionStrings in your configuration:
{
"ConnectionStrings": {
"kusto": "https://your-cluster.kusto.windows.net"
}
}
Using Aspire Configuration
Alternatively, configure settings under the Aspire:Kusto:Client section:
{
"Aspire": {
"Kusto": {
"Client": {
"HostAddress": "https://your-cluster.kusto.windows.net",
"DatabaseName": "MyDatabase",
"DisableHealthChecks": false,
"HealthCheckTimeout": 4000
}
}
}
}
Inline Configuration
You can also configure settings inline when registering the service:
builder.ConfigureAzureDataExplorer("kusto", settings =>
{
settings.DatabaseName = "MyDatabase";
});
Requirements
How to contribute
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- Atc.Kusto (>= 2.0.1)
- Azure.Identity (>= 1.13.2)
- Microsoft.Azure.Kusto.Data (>= 13.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 9.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.1)
- OpenTelemetry.Extensions.Hosting (>= 1.11.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.