Skip to content

Commit

Permalink
Merge branch 'release/8.0-preview1' into 'internal/release/8.0-preview1'
Browse files Browse the repository at this point in the history
  • Loading branch information
joperezr committed Nov 7, 2023
2 parents 377dc1a + 7d040dc commit f7905ba
Show file tree
Hide file tree
Showing 27 changed files with 81 additions and 79 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<PackageVersion Include="RabbitMQ.Client" Version="6.6.0" />
<PackageVersion Include="StackExchange.Redis" Version="2.6.122" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.1.0-preview.1.23428.7" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.1.0-preview.1.23556.5" />
<!-- Open Telemetry -->
<PackageVersion Include="Npgsql.OpenTelemetry" Version="8.0.0-rc.2" />
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="1.7.0-alpha.1" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .NET Aspire

## Getting started with Aspire
## Getting started with .NET Aspire

Follow instructions in [docs/getting-started.md](docs/getting-started.md) to get started using .NET Aspire.

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-perf-traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Collect the trace using PerfView (https://github.com/microsoft/perfview/releases
1. Increase Circular MB to 8192.
1. Check the "Thread Time" checkbox.
1. Expand Advanced Options panel and make sure you have Kernel Base, Cpu Samples, File I/O, .NET, and Task (TPL) options checked.
1. In "Additional Providers" add `*Microsoft-Aspire-Hosting` (note the asterisk before the Aspire provider name!).
1. In "Additional Providers" add `*Microsoft-Aspire-Hosting` (note the asterisk before the .NET Aspire provider name!).

Once you are ready, git "Start Collection" button and run your scenario.

When done with the scenario, hit "Stop Collection". Wait for PerfView to finish merging and analyzing data (the "working" status bar stops flashing).

### Verify that the trace contains data Aspire data
### Verify that the trace contains data .NET Aspire data

This is an optional step, but if you are wondering if your trace has been captured properly, you can check the following:

Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ it, you need to perform the following steps:
expiration length:
[<img width="583" alt="image" src="https://user-images.githubusercontent.com/249088/160220117-7e79822e-a18a-445c-89ff-b3d9ca84892f.png">](https://github.com/settings/tokens/new)

1. At the command line, go to the root of the Aspire repo and run the following
1. At the command line, go to the root of the .NET Aspire repo and run the following
commands to add the package feed to your NuGet configuration, replacing the
`<YOUR_USER_NAME>` and `<YOUR_TOKEN>` placeholders with the relevant values:
```text
dotnet nuget remove source dotnet-libraries-internal
dotnet nuget add source -u <YOUR_USER_NAME> -p <YOUR_TOKEN> --name dotnet-libraries-internal "https://nuget.pkg.github.com/dotnet/index.json"
```

## Install the Aspire dotnet workload
## Install the .NET Aspire dotnet workload

### Visual Studio

Expand All @@ -73,19 +73,19 @@ Ensure the `.NET Aspire SDK` component is checked in `Individual components`.

### Command line

1. The RTM nightly SDK is aware that the Aspire workload exists, but the real manifest is not installed by default. In order to install it, you'll need to update the workload in a directory that has a NuGet.config[^3] with the right feeds configured[^2] so that it can pull the latest manifest. Once you have created the NuGet.config file in your working directory, then you need to run the following command[^1]:
1. The RTM nightly SDK is aware that the .NET Aspire workload exists, but the real manifest is not installed by default. In order to install it, you'll need to update the workload in a directory that has a NuGet.config[^3] with the right feeds configured[^2] so that it can pull the latest manifest. Once you have created the NuGet.config file in your working directory, then you need to run the following command[^1]:

```shell
dotnet workload update --skip-sign-check --interactive
```

2. The above command will update the Aspire manifest in your SDK build, meaning it will already be setup for command-line and Visual Studio in-product acquisition (IPA) of the Aspire workload. In order to manually install the workload, you can run the following command[^1]:
2. The above command will update the .NET Aspire manifest in your SDK build, meaning it will already be setup for command-line and Visual Studio in-product acquisition (IPA) of the .NET Aspire workload. In order to manually install the workload, you can run the following command[^1]:

```shell
dotnet workload install aspire --skip-sign-check --interactive
```

[^1]: The `--skip-sign-check` flag is required because the packages we build out of the Aspire repo are not yet signed.
[^1]: The `--skip-sign-check` flag is required because the packages we build out of the .NET Aspire repo are not yet signed.
[^2]: If you want to create a separate NuGet.config instead, these are the contents you need:
```xml
<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -111,7 +111,7 @@ Ensure the `.NET Aspire SDK` component is checked in `Individual components`.

## Using command line using workload templates

- To create an empty Aspire project[^3], run the following command::
- To create an empty .NET Aspire project[^3], run the following command::

```shell
dotnet new aspire
Expand All @@ -123,7 +123,7 @@ Ensure the `.NET Aspire SDK` component is checked in `Individual components`.
dotnet new aspire-starter
```

[^3]: In order for these commands to work, you must have already installed the Aspire workload by following the steps in #Install-the-Aspire-dotnet-workload section.
[^3]: In order for these commands to work, you must have already installed the .NET Aspire workload by following the steps in #Install-the-Aspire-dotnet-workload section.

You need to create a `NuGet.config` file in the root directory of your project with the contents above.
Once that is created you can build with
Expand Down
20 changes: 10 additions & 10 deletions docs/open-telemetry-architecture.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Aspire OpenTelemetry architecture
# .NET Aspire OpenTelemetry architecture

One of Aspire's objectives is to ensure that apps are straightforward to debug and diagnose. By default, Aspire apps are configured to collect and export telemetry using [OpenTelemetry (OTEL)](https://opentelemetry.io/). Additionally, Aspire local development includes UI in the dashboard for viewing OTEL data. Telemetry just works and is easy to use.
One of .NET Aspire's objectives is to ensure that apps are straightforward to debug and diagnose. By default, .NET Aspire apps are configured to collect and export telemetry using [OpenTelemetry (OTEL)](https://opentelemetry.io/). Additionally, .NET Aspire local development includes UI in the dashboard for viewing OTEL data. Telemetry just works and is easy to use.

This document details how OpenTelemtry is used in Aspire apps.
This document details how OpenTelemtry is used in .NET Aspire apps.

## Telemetry types

Expand All @@ -18,7 +18,7 @@ When an OpenTelemetry SDK is configured in an app, it receives data from these A

The [.NET OpenTelemetry SDK](https://github.com/open-telemetry/opentelemetry-dotnet) offers features for gathering data from several .NET APIs, including `ILogger`, `Activity`, `Meter`, and `Instrument<T>`. It then facilitates the export of this telemetry data to a data store or reporting tool. The telemetry export mechanism relies on the [OpenTelemetry protocol (OTLP)](https://opentelemetry.io/docs/specs/otel/protocol/), which serves as a standardized approach for transmitting telemetry data through REST or gRPC.

.NET projects setup the .NET OpenTelemetry SDK using the _service defaults_ project. Aspire templates automatically create the service defaults, and Aspire apps call it at startup. The service defaults enable collecting and exporting telemetry for .NET apps.
.NET projects setup the .NET OpenTelemetry SDK using the _service defaults_ project. .NET Aspire templates automatically create the service defaults, and .NET Aspire apps call it at startup. The service defaults enable collecting and exporting telemetry for .NET apps.

## OpenTelemetry environment variables

Expand All @@ -32,24 +32,24 @@ Aspire apps launch with environment variables that configure the name and ID of

The environment variables are automatically set in local development.

## Aspire local development
## .NET Aspire local development

The Aspire dashboard provides UI for viewing the telemetry of apps. Telemetry data is sent to the dashboard using OTLP, and the dashboard implements an OTLP server to receive telemetry data and store it in memory. The dashboard UI presents telemetry stored in memory.
The .NET Aspire dashboard provides UI for viewing the telemetry of apps. Telemetry data is sent to the dashboard using OTLP, and the dashboard implements an OTLP server to receive telemetry data and store it in memory. The dashboard UI presents telemetry stored in memory.

Aspire debugging workflow:

* Developer starts the Aspire app with debugging, presses <kbd>F5</kbd>.
* Aspire dashboard and developer control plane (DCP) start.
* Developer starts the .NET Aspire app with debugging, presses <kbd>F5</kbd>.
* .NET Aspire dashboard and developer control plane (DCP) start.
* App configuration is run in the _AppHost_ project.
* OTEL environment variables are automatically added to .NET projects during app configuration.
* DCP provides the name (`OTEL_SERVICE_NAME`) and ID (`OTEL_RESOURCE_ATTRIBUTES`) of the app in exported telemetry.
* The OTLP endpoint is an HTTP/2 port started by the dashboard. This endpoint is set in the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable on each project. That tells projects to export telemetry back to the dashboard.
* Small export intervals (`OTEL_BSP_SCHEDULE_DELAY`, `OTEL_BLRP_SCHEDULE_DELAY`, `OTEL_METRIC_EXPORT_INTERVAL`) so data is quickly available in the dashboard. Small values are used in local development to prioritize dashboard responsiveness over efficiency.
* The DCP starts configured projects, containers, and executables.
* Once started, apps send telemetry to the dashboard.
* Dashboard displays near real-time telemetry of all Aspire apps.
* Dashboard displays near real-time telemetry of all .NET Aspire apps.

## Aspire deployment
## .NET Aspire deployment

Aspire deployment environments should configure OTEL environment variables that make sense for their environment. For example, `OTEL_EXPORTER_OTLP_ENDPOINT` should be configured to the environment's local OTLP collector or monitoring service.

Expand Down
2 changes: 1 addition & 1 deletion docs/repo-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can launch VS with:
1. `.\restore.cmd`
2. `.\startvs.cmd`

# Run the Aspire eShopLite sample
# Run the .NET Aspire eShopLite sample

## Enable Azure ServiceBus (optional)

Expand Down
6 changes: 3 additions & 3 deletions docs/specs/manifest-spec.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Manifest Specification for Aspire's Distributed Application Model
# Manifest Specification for .NET Aspire's Distributed Application Model

This is a specification for the manifest file for Aspire's Distributed Application Model. The purpose of the manifest file is to allow developers to export definitions of components that comprise their distributed application model and their dependencies so that other tools can process it to facilitate deployment into target runtime environments.
This is a specification for the manifest file for .NET Aspire's Distributed Application Model. The purpose of the manifest file is to allow developers to export definitions of components that comprise their distributed application model and their dependencies so that other tools can process it to facilitate deployment into target runtime environments.

The format of the manifest file itself does not pre-suppose a particular target environment but this document will make reference to specific cloud providers and technologies for illustrative purposes.

## Basic model

The Aspire distributed application model is comprised components which are typically deployed together as a unit. For example there may be a front-end ASP.NET Core application which calls into one or more backend services which in turn may depend on relational databases or caches. Consider the following sample (taken from the eShop light example):
The .NET Aspire distributed application model is comprised components which are typically deployed together as a unit. For example there may be a front-end ASP.NET Core application which calls into one or more backend services which in turn may depend on relational databases or caches. Consider the following sample (taken from the eShop light example):

```csharp
using Aspire.Hosting.Postgres;
Expand Down
4 changes: 2 additions & 2 deletions docs/tips-and-known-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ We have seen Docker get into weird state on "DevBox" machines that get hibernate

The remedy is to do "Restart Docker" gesture from the Docker icon in system tray.

### If something goes wrong and you are left with a bunch of Aspire eShopLite orphaned processes and containers
### If something goes wrong and you are left with a bunch of .NET Aspire eShopLite orphaned processes and containers

This will display process IDs of all the Aspire shopping running processes
This will display process IDs of all the .NET Aspire shopping running processes

```ps1
ps | where ProcessName -cmatch '(Api)|(Catalog)|(Basket)|(AppHost)|(MyFrontend)|(OrderProcessor)' | % {Write-Output $_.Id }
Expand Down
6 changes: 4 additions & 2 deletions src/Aspire.Dashboard/DashboardWebApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public DashboardWebApplication(ILogger<DashboardWebApplication> logger, Action<I

if (dashboardUris.FirstOrDefault() is { } reportedDashboardUri)
{
_logger.LogInformation("Dashboard running at: {dashboardUri}", reportedDashboardUri);
// dotnet watch needs the trailing slash removed. See https://github.com/dotnet/sdk/issues/36709
_logger.LogInformation("Now listening on: {dashboardUri}", reportedDashboardUri.AbsoluteUri.TrimEnd('/'));
}

var dashboardHttpsPort = dashboardUris.FirstOrDefault(IsHttps)?.Port;
Expand All @@ -53,7 +54,8 @@ public DashboardWebApplication(ILogger<DashboardWebApplication> logger, Action<I

if (otlpUris.FirstOrDefault() is { } reportedOtlpUri)
{
_logger.LogInformation("OTLP server running at: {dashboardUri}", reportedOtlpUri);
// dotnet watch needs the trailing slash removed. See https://github.com/dotnet/sdk/issues/36709. Conform to dashboard URL format above
_logger.LogInformation("OTLP server running at: {dashboardUri}", reportedOtlpUri.AbsoluteUri.TrimEnd('/'));
}

_isAllHttps = dashboardHttpsPort is not null && IsHttps(otlpUris[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting/build/Aspire.Hosting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public class ]]>%(ClassName)<![CDATA[ : IServiceMetadata
</Target>

<PropertyGroup>
<AspirePublisher Condition="'(AspirePublisher)' == ''">manifest</AspirePublisher>
<AspirePublisher Condition="'$(AspirePublisher)' == ''">manifest</AspirePublisher>
<AspireManifestPublishOutputPath Condition="'$(AspireManifestPublishOutputPath)' == ''">$(_AspireIntermediatePath)manifest.json</AspireManifestPublishOutputPath>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/Components/Aspire.Azure.Data.Tables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Registers [TableServiceClient](https://learn.microsoft.com/dotnet/api/azure.data

### Install the package

Install the Aspire Azure Table storage library with [NuGet][nuget]:
Install the .NET Aspire Azure Table storage library with [NuGet][nuget]:

```dotnetcli
dotnet add package Aspire.Azure.Data.Tables
Expand Down Expand Up @@ -40,7 +40,7 @@ See the [Azure.Data.Tables documentation](https://github.com/Azure/azure-sdk-for

## Configuration

The Aspire Azure Table storage library provides multiple options to configure the Azure Table connection based on the requirements and conventions of your project. Note that either a `ServiceUri` or a `ConnectionString` is a required to be supplied.
The .NET Aspire Azure Table storage library provides multiple options to configure the Azure Table connection based on the requirements and conventions of your project. Note that either a `ServiceUri` or a `ConnectionString` is a required to be supplied.

### Use a connection string

Expand Down
6 changes: 3 additions & 3 deletions src/Components/Aspire.Azure.Messaging.ServiceBus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Registers a [ServiceBusClient](https://learn.microsoft.com/dotnet/api/azure.mess

### Install the package

Install the Aspire Azure Service Bus library with [NuGet][nuget]:
Install the .NET Aspire Azure Service Bus library with [NuGet][nuget]:

```dotnetcli
dotnet add package Aspire.Azure.Messaging.ServiceBus
Expand Down Expand Up @@ -40,7 +40,7 @@ See the [Azure.Messaging.ServiceBus documentation](https://github.com/Azure/azur

## Configuration

The Aspire Azure Service Bus library provides multiple options to configure the Azure Service Bus connection based on the requirements and conventions of your project. Note that either a `Namespace` or a `ConnectionString` is a required to be supplied.
The .NET Aspire Azure Service Bus library provides multiple options to configure the Azure Service Bus connection based on the requirements and conventions of your project. Note that either a `Namespace` or a `ConnectionString` is a required to be supplied.

### Use a connection string

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

### Use configuration providers

The Aspire Azure Service Bus library supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `AzureMessagingServiceBusSettings` and `ServiceBusClientOptions` from configuration by using the `Aspire:Azure:Messaging:ServiceBus` key. Example `appsettings.json` that configures some of the options:
The .NET Aspire Azure Service Bus library supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `AzureMessagingServiceBusSettings` and `ServiceBusClientOptions` from configuration by using the `Aspire:Azure:Messaging:ServiceBus` key. Example `appsettings.json` that configures some of the options:

```json
{
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Aspire.Azure.Security.KeyVault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Retrieves secrets from Azure Key Vault to use in your application. Registers a [

### Install the package

Install the Aspire Azure Key Vault library with [NuGet][nuget]:
Install the .NET Aspire Azure Key Vault library with [NuGet][nuget]:

```dotnetcli
dotnet add package Aspire.Azure.Security.KeyVault
Expand Down Expand Up @@ -59,7 +59,7 @@ See the [Azure.Security.KeyVault.Secrets documentation](https://github.com/Azure

## Configuration

The Aspire Azure Key Vault library provides multiple options to configure the Azure Key Vault connection based on the requirements and conventions of your project. Note that the `VaultUri` is required to be supplied.
The .NET Aspire Azure Key Vault library provides multiple options to configure the Azure Key Vault connection based on the requirements and conventions of your project. Note that the `VaultUri` is required to be supplied.

### Use a connection string

Expand All @@ -81,7 +81,7 @@ And then the vault URI will be retrieved from the `ConnectionStrings` configurat

### Use configuration providers

The Aspire Azure Key Vault library supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `AzureSecurityKeyVaultSettings` and `SecretClientOptions` from configuration by using the `Aspire:Azure:Security:KeyVault` key. Example `appsettings.json` that configures some of the options:
The .NET Aspire Azure Key Vault library supports [Microsoft.Extensions.Configuration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration). It loads the `AzureSecurityKeyVaultSettings` and `SecretClientOptions` from configuration by using the `Aspire:Azure:Security:KeyVault` key. Example `appsettings.json` that configures some of the options:

```json
{
Expand Down
Loading

0 comments on commit f7905ba

Please sign in to comment.