Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3b3fd6d
Add diagnostics overview page (#543)
IEvangelist Mar 28, 2024
2379187
Add placeholder for preview-5 what's new (#558)
IEvangelist Mar 28, 2024
dc31ad0
Add details about hosting components. (#559)
IEvangelist Mar 29, 2024
e156eba
Add new article to fix #551 (#562)
IEvangelist Mar 29, 2024
2948202
Update preview-5.md
davidfowl Mar 30, 2024
7a591b5
Update preview-5.md
davidfowl Mar 30, 2024
25ae3f5
Add healthz details (#563)
IEvangelist Apr 2, 2024
8bc34d3
Added a section about custom service defaults (#560)
IEvangelist Apr 2, 2024
0c0b3d3
Remove AddBuiltInMeters() (#518)
martincostello Apr 2, 2024
a7d75d2
Try sync with source (#570)
IEvangelist Apr 2, 2024
a34624b
Update preview-5.md
kvenkatrajan Apr 2, 2024
8839675
Added a few bits about templates (#572)
IEvangelist Apr 2, 2024
c8d05e4
Initial bits for hosting changes. (#561)
IEvangelist Apr 2, 2024
67efe4c
Deployment scenarios with k8s (#583)
IEvangelist Apr 4, 2024
82a120a
Add seq component (#584)
alexwolfmsft Apr 4, 2024
a49f9d4
Nats component (#586)
alexwolfmsft Apr 4, 2024
e7665e4
Add Azure Event Hubs component + (#587)
IEvangelist Apr 4, 2024
3c71bb9
Update component section of preview5.
eerhardt Apr 5, 2024
1789095
Correct package as Azure AI hosting
IEvangelist Apr 5, 2024
8e816c2
Add missing PostgreSQL hosting package
IEvangelist Apr 5, 2024
89ffb41
Clean up custom impl of service defaults
IEvangelist Apr 5, 2024
525b6e2
Initial content for preview 5. (#588)
mitchdenny Apr 5, 2024
6c8b7c2
Initial effort for local provisioning (#589)
IEvangelist Apr 5, 2024
a93575c
added tooling features
bradygaster Apr 5, 2024
beba882
Merge branch 'preview-5' of https://github.com/dotnet/docs-aspire int…
bradygaster Apr 5, 2024
57d9a92
A few bits of cleanup
IEvangelist Apr 5, 2024
7769505
Added note about upgrade assistant tooling
timheuer Apr 6, 2024
e549702
More P5 updates across Azure, AppModel and manifest. (#596)
mitchdenny Apr 8, 2024
16e20f7
Another major edit pass, with several more to go
IEvangelist Apr 8, 2024
7560018
Add link
IEvangelist Apr 8, 2024
499ee77
A few more bits of cleanup
IEvangelist Apr 8, 2024
bbe916c
Add link to templates
IEvangelist Apr 8, 2024
0f63139
Fix xUnit template description
IEvangelist Apr 8, 2024
379de23
Another edit pass
IEvangelist Apr 8, 2024
773cc72
Add link to upgrade with assitant
IEvangelist Apr 8, 2024
494f23e
Remove .NET Core naming
IEvangelist Apr 8, 2024
cfd45fd
For more info
IEvangelist Apr 8, 2024
d0f1bec
Update docs/fundamentals/setup-tooling.md
mitchdenny Apr 8, 2024
bd45e1d
Fixed headings affecting TOC
timheuer Apr 8, 2024
d6dc890
Remove IDE protocol ending
timheuer Apr 9, 2024
86fd615
Making dashboard auth be explicit on the config auth name
timheuer Apr 9, 2024
4cfcdff
Dashboard section update
JamesNK Apr 9, 2024
67ca91a
Dash
JamesNK Apr 9, 2024
b55435a
Update
JamesNK Apr 9, 2024
8ec7280
Update
JamesNK Apr 9, 2024
36bf646
Update
JamesNK Apr 9, 2024
1e7f157
Apply suggestions from code review
davidfowl Apr 9, 2024
2797c86
Update preview-5.md
davidfowl Apr 9, 2024
d37a5d2
Fix docker command
JamesNK Apr 9, 2024
0a6651c
Add with external endpoint API
IEvangelist Apr 9, 2024
b38633e
Fix non-nuget link warnings, and other CI issues
IEvangelist Apr 9, 2024
d66955e
Fix last absolute link warning
IEvangelist Apr 9, 2024
a3ed04c
Add ASPIRE_ALLOW_UNSECURED_TRANSPORT details
IEvangelist Apr 9, 2024
a1ab17f
Minor tweaks
IEvangelist Apr 9, 2024
d18df1d
Typo
IEvangelist Apr 9, 2024
718954a
Apply suggestions from code review
IEvangelist Apr 9, 2024
bb250aa
Touch
IEvangelist Apr 9, 2024
3375827
Add AWS bits
IEvangelist Apr 9, 2024
2bdbc3e
Correct link
IEvangelist Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions docs/azureai/azureai-openai-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: .NET Aspire Azure AI OpenAI component
description: Learn how to use the .NET Aspire Azure AI OpenAI component.
ms.topic: how-to
ms.date: 03/13/2024
ms.date: 04/04/2024
---

# .NET Aspire Azure AI OpenAI component
Expand Down Expand Up @@ -54,7 +54,22 @@ public class ExampleService(OpenAIClient client)

## App host usage

[!INCLUDE [azure-component-nuget](../includes/azure-component-nuget.md)]
To add Azure AI hosting support to your <xref:Aspire.Hosting.IDistributedApplicationBuilder>, install the [Aspire.Hosting.Azure.CognitiveServices](https://www.nuget.org/packages/Aspire.Hosting.Azure.CognitiveServices) NuGet package.

### [.NET CLI](#tab/dotnet-cli)

```dotnetcli
dotnet add package Aspire.Hosting.Azure.CognitiveServices --prerelease
```

### [PackageReference](#tab/package-reference)

```xml
<PackageReference Include="Aspire.Hosting.Azure.CognitiveServices"
Version="[SelectVersion]" />
```

---

In your app host project, register an Azure AI OpenAI resource using the following methods, such as <xref:Aspire.Hosting.AzureResourceExtensions.AddAzureOpenAI%2A>:

Expand Down
23 changes: 19 additions & 4 deletions docs/azureai/azureai-search-document-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: NET Aspire Azure AI Search Documents component
description: Learn how to use the NET Aspire Azure AI Search Documents component.
ms.topic: how-to
ms.date: 03/11/2024
ms.date: 04/09/2024
---

# NET Aspire Azure AI Search Documents component
Expand Down Expand Up @@ -71,11 +71,26 @@ public class ExampleService(SearchIndexClient indexClient)
}
```

For more information, see the [Azure AI Search client library for .NET](https://learn.microsoft.com/dotnet/api/overview/azure/search.documents-readme?view=azure-dotnet&preserve-view=true) for examples on using the `SearchIndexClient`.
For more information, see the [Azure AI Search client library for .NET](/dotnet/api/overview/azure/search.documents-readme?view=azure-dotnet&preserve-view=true) for examples on using the `SearchIndexClient`.

## App host usage

[!INCLUDE [azure-component-nuget](../includes/azure-component-nuget.md)]
To add Azure AI hosting support to your <xref:Aspire.Hosting.IDistributedApplicationBuilder>, install the [Aspire.Hosting.Azure.CognitiveServices](https://www.nuget.org/packages/Aspire.Hosting.Azure.CognitiveServices) NuGet package.

### [.NET CLI](#tab/dotnet-cli)

```dotnetcli
dotnet add package Aspire.Hosting.Azure.CognitiveServices --prerelease
```

### [PackageReference](#tab/package-reference)

```xml
<PackageReference Include="Aspire.Hosting.Azure.CognitiveServices"
Version="[SelectVersion]" />
```

---

In the _Program.cs_ file of `AppHost`, add an Azure Search service and consume the connection using the following methods:

Expand Down Expand Up @@ -134,7 +149,7 @@ Alternatively, a custom connection string can be used.

### Use configuration providers

The .NET Aspire Azure AI Search library supports [Microsoft.Extensions.Configuration](xref:Microsoft.Extensions.Configuration). It loads the `AzureSearchSettings` and `SearchClientOptions` from configuration by using the `Aspire:Azure:Search:Documents` key. Example `appsettings.json` that configures some of the options:
The .NET Aspire Azure AI Search library supports <xref:Microsoft.Extensions.Configuration?displayProperty=fullName>. It loads the `AzureSearchSettings` and `SearchClientOptions` from configuration by using the `Aspire:Azure:Search:Documents` key. Example `appsettings.json` that configures some of the options:

```json
{
Expand Down
19 changes: 17 additions & 2 deletions docs/database/azure-cosmos-db-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: .NET Aspire Azure Cosmos DB component
description: This article describes the .NET Aspire Azure Cosmos DB component features and capabilities.
ms.topic: how-to
ms.date: 03/13/2024
ms.date: 04/09/2024
---

# .NET Aspire Azure Cosmos DB component
Expand Down Expand Up @@ -51,7 +51,22 @@ For more information on using the <xref:Microsoft.Azure.Cosmos.CosmosClient>, se

## App host usage

[!INCLUDE [azure-component-nuget](../includes/azure-component-nuget.md)]
To add Azure Cosmos DB hosting support to your <xref:Aspire.Hosting.IDistributedApplicationBuilder>, install the [Aspire.Hosting.Azure.CosmosDB](https://www.nuget.org/packages/Aspire.Hosting.Azure.CosmosDB) NuGet package.

### [.NET CLI](#tab/dotnet-cli)

```dotnetcli
dotnet add package Aspire.Hosting.Azure.CosmosDB --prerelease
```

### [PackageReference](#tab/package-reference)

```xml
<PackageReference Include="Aspire.Hosting.Azure.CosmosDB"
Version="[SelectVersion]" />
```

---

In your app host project, register the .NET Aspire Azure Cosmos DB component and consume the service using the following methods:

Expand Down
19 changes: 17 additions & 2 deletions docs/database/azure-cosmos-db-entity-framework-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: .NET Aspire Microsoft Entity Framework Core Cosmos DB component
description: This article describes the .NET Aspire Microsoft Entity Framework Core Cosmos DB component features and capabilities.
ms.topic: how-to
ms.date: 01/22/2024
ms.date: 04/04/2024
---

# .NET Aspire Microsoft Entity Framework Core Cosmos DB component
Expand Down Expand Up @@ -51,7 +51,22 @@ For more information on using Entity Framework Core with Azure Cosmos DB, see th

## App host usage

[!INCLUDE [azure-component-nuget](../includes/azure-component-nuget.md)]
To add Azure Cosmos DB hosting support to your <xref:Aspire.Hosting.IDistributedApplicationBuilder>, install the [Aspire.Hosting.Azure.CosmosDB](https://www.nuget.org/packages/Aspire.Hosting.Azure.CosmosDB) NuGet package.

### [.NET CLI](#tab/dotnet-cli)

```dotnetcli
dotnet add package Aspire.Hosting.Azure.CosmosDB --prerelease
```

### [PackageReference](#tab/package-reference)

```xml
<PackageReference Include="Aspire.Hosting.Azure.CosmosDB"
Version="[SelectVersion]" />
```

---

In your app host project, register the .NET Aspire Microsoft Entity Framework Core Cosmos DB component and consume the service using the following methods:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting" Version="8.0.0-preview.4.24156.9" />
<PackageReference Include="Aspire.Microsoft.Data.SqlClient"
Version="8.0.0-preview.4.24156.9" />
<PackageReference Include="Aspire.Microsoft.EntityFrameworkCore.SqlServer"
Version="8.0.0-preview.4.24156.9" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.0.0-preview.5.24201.12" />
<PackageReference Include="Aspire.Hosting.SqlServer" Version="8.0.0-preview.5.24201.12" />
<PackageReference Include="Aspire.Microsoft.Data.SqlClient" Version="8.0.0-preview.5.24201.12" />
<PackageReference Include="Aspire.Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-preview.5.24201.12" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.3.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.4.24156.9" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.5.24201.12" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.7.0-beta.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.4" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.ServiceDiscovery;
using OpenTelemetry.Logs;
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;

namespace Microsoft.Extensions.Hosting;

public static class Extensions
{
public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder)
Expand All @@ -24,9 +26,15 @@ public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBu
http.AddStandardResilienceHandler();

// Turn on service discovery by default
http.UseServiceDiscovery();
http.AddServiceDiscovery();
});

// Uncomment the following to restrict the allowed schemes for service discovery.
// builder.Services.Configure<ServiceDiscoveryOptions>(options =>
// {
// options.AllowedSchemes = ["https"];
// });

return builder;
}

Expand All @@ -42,9 +50,8 @@ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicati
.WithMetrics(metrics =>
{
metrics.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddProcessInstrumentation()
.AddRuntimeInstrumentation();
.AddHttpClientInstrumentation()
.AddRuntimeInstrumentation();
})
.WithTracing(tracing =>
{
Expand All @@ -55,8 +62,9 @@ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicati
}

tracing.AddAspNetCoreInstrumentation()
.AddGrpcClientInstrumentation()
.AddHttpClientInstrumentation();
// Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package)
//.AddGrpcClientInstrumentation()
.AddHttpClientInstrumentation();
});

builder.AddOpenTelemetryExporters();
Expand Down Expand Up @@ -103,15 +111,20 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
// Uncomment the following line to enable the Prometheus endpoint (requires the OpenTelemetry.Exporter.Prometheus.AspNetCore package)
// app.MapPrometheusScrapingEndpoint();

// All health checks must pass for app to be considered ready to accept traffic after starting
app.MapHealthChecks("/health");

// Only health checks tagged with the "live" tag must pass for app to be considered alive
app.MapHealthChecks("/alive", new HealthCheckOptions
// Adding health checks endpoints to applications in non-development environments has security implications.
// See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments.
if (app.Environment.IsDevelopment())
{
Predicate = r => r.Tags.Contains("live")
});
// All health checks must pass for app to be considered ready to accept traffic after starting
app.MapHealthChecks("/health");

// Only health checks tagged with the "live" tag must pass for app to be considered alive
app.MapHealthChecks("/alive", new HealthCheckOptions
{
Predicate = r => r.Tags.Contains("live")
});
}

return app;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-preview.4.24156.9" />
<PackageReference Include="Aspire.Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0-preview.5.24201.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Loading