microsoft / microsoft/aspire

Regression: Metrics / Tracing not visible in dashboard when using a custom service name

Open
#10,147 4 comments 0 reactions 0 assignees View on GitHub
area-dashboard
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

We've been using Aspire for a while now, and since 9.3.x we could no longer see our metrics in the dashboard. Turns out it also affect metrics & logs.

We have our API's setup to export logs, metrics and traces using the otlp exporter. When registering the services we are setting the resourcebuilder that has a service with a custom service name that is different from the resource name.

With **Aspire 9.3.1 or 9.3.0:**

Logs are only visible under the aspire resource name:

![Image](https://github.com/user-attachments/assets/e42ec40a-b662-4fa5-9e7a-ea401d4434fe)

![Image](https://github.com/user-attachments/assets/188e5662-d43b-4e77-bdb1-1d77f906b2a9)

Traces are only visible under "(All)":

![Image](https://github.com/user-attachments/assets/0768394c-3a9e-4f69-ab61-20cbfcbbfcd4)

![Image](https://github.com/user-attachments/assets/31d7e3ea-efa2-48dc-9c9e-219ac3349f35)

![Image](https://github.com/user-attachments/assets/842db475-4538-4cf8-83eb-d6637af32ba2)

Metrics cannot be viewed:

![Image](https://github.com/user-attachments/assets/e508ced1-8d56-4c48-af90-8ea12ddac60f)

![Image](https://github.com/user-attachments/assets/053f2a53-820c-4ffd-a681-11364fa2417f)

![Image](https://github.com/user-attachments/assets/5971b506-1c5c-4873-a076-9a8c519e0002)

If we do a rollback to a deprecated version of **Aspire 9.2.1**:

Logs are visible under the aspire resource name but **not under the custom service name** (never noticed untill now):

![Image](https://github.com/user-attachments/assets/bacf1bb3-0057-4582-b03e-8da9fd84bd2f)

Traces are visible under the custom service name:

![Image](https://github.com/user-attachments/assets/276be280-48ea-469e-9240-a2ed3469a0af)

Metrics are visible under the custom service name:

![Image](https://github.com/user-attachments/assets/51fda4e5-866a-44b1-8d0c-390fc66aea5c)

### Expected Behavior

I can use a Custom Service Name and see Logs / Traces / Metrics related to that service when selecting it from the dropdown.

### Steps To Reproduce

[repro available here](https://github.com/thijscornelis/aspire-metric-repro)

### Exceptions (if any)

None.

### .NET Version info

.NET SDK:
Version: 9.0.301
Commit: a596cd22e2
Workload version: 9.0.300-manifests.07067f5b
MSBuild version: 17.14.5+edd3bbf37

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.301\

.NET workloads installed:
[maui-windows]
Installation Source: VS 17.14.36203.30
Manifest Version: 9.0.51/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.51\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 17.14.36203.30
Manifest Version: 18.4.9288/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.4.9288\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 17.14.36203.30
Manifest Version: 18.4.9288/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.4.9288\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 17.14.36203.30
Manifest Version: 35.0.61/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.61\WorkloadManifest.json
Install Type: Msi

[aspire]
Installation Source: VS 17.14.36203.30
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.6
Architecture: x64
Commit: 3875b54e7b

.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.416 [C:\Program Files\dotnet\sdk]
7.0.120 [C:\Program Files\dotnet\sdk]
8.0.206 [C:\Program Files\dotnet\sdk]
8.0.314 [C:\Program Files\dotnet\sdk]
8.0.411 [C:\Program Files\dotnet\sdk]
9.0.107 [C:\Program Files\dotnet\sdk]
9.0.301 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.