Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aspire Dashboard Metrics: Meter tags do not display #4380

Closed
JackRhodes opened this issue Jun 4, 2024 · 3 comments · Fixed by #5070
Closed

Aspire Dashboard Metrics: Meter tags do not display #4380

JackRhodes opened this issue Jun 4, 2024 · 3 comments · Fixed by #5070

Comments

@JackRhodes
Copy link

Originally posted in the open-telemetry/opentelemetry-dotnet#5669 (comment) but re-directing here:

Aspire dashboard does not show Meter defined Tags in the dashboard

Example code:

// See https://aka.ms/new-console-template for more information

using System.Diagnostics.Metrics;
using OpenTelemetry;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;

using var meter = new Meter("TestMeter", "1.0.0", new[]
{
    new KeyValuePair<string, object?>("namespace", "jacklocaldev")
});

var providerBuilder = Sdk.CreateMeterProviderBuilder()
    .ConfigureResource(r => r.AddService("testservice"))
    .AddMeter(meter.Name); // All instruments from this meter are enabled.

providerBuilder.AddOtlpExporter();

var provider = providerBuilder.Build();

while (true)
{
    await Task.Delay(TimeSpan.FromSeconds(1));
    meter.CreateCounter<int>("foo").Add(1);
}

Aspire Dashboard:

I would be expecting the namespace tag to show.

image

@JackRhodes JackRhodes changed the title Aspire Dashboard: Meter tags do not display Aspire Dashboard Metrics: Meter tags do not display Jun 4, 2024
@leslierichardson95 leslierichardson95 added this to the 8.2 milestone Jun 25, 2024
@JamesNK
Copy link
Member

JamesNK commented Jul 24, 2024

Hi, I tested this out and confirmed what you're seeing. I believe the issue is inside opentelemetry-dotnet. It doesn't send the meter tags so it's impossible for the dashboard to display them.

Here is the issue on the opentelemetry repo: open-telemetry/opentelemetry-dotnet#5478

The only thing we can do is wait for them to fix the issue, release a new version, then update Aspire's package references to the new version.

@cijothomas
Copy link

I believe the issue is inside opentelemetry-dotnet. It doesn't send the meter tags

@JamesNK Meter tags are supported in OTLP Exporters. Is the issue only when using Aspire dashboard, or can be repro-ed with OTel Collector?

@JamesNK
Copy link
Member

JamesNK commented Jul 25, 2024

I took a closer look and I see they're reported on the instrument scope. I expected them to be merged into the attributes collection on a data point.

I'll update the UI to combine them.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants