dotnet / dotnet-monitor

This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints
MIT License
640 stars 113 forks source link

Histogram custom tags are not parsed correctly and not showing up. #7654

Open XiLiuRoy opened 1 day ago

XiLiuRoy commented 1 day ago

Description

Histogram meter custom tags value are not parsed using correct separater "=", as when sending up Histogram (AggregatePercentilePayload) with custom tags to dotnet monitor, in file MetricStore.cs line, it's missing a case for "AggregatePercentilePayload", which caused the IsMeter method to return false, and using ":" to parse custom tags, as a result, it returns nothing as custom tags.

Configuration

Runtime Environment: OS Name: Mac OS X OS Version: 14.6 OS Platform: Darwin RID: osx-arm64 Base Path: /usr/local/share/dotnet/sdk/8.0.203/

.NET workloads installed: There are no installed workloads to display.

Host: Version: 9.0.0-rc.2.24473.5 Architecture: arm64 Commit: 990ebf52fc

.NET SDKs installed: 6.0.418 [/usr/local/share/dotnet/sdk] 7.0.405 [/usr/local/share/dotnet/sdk] 8.0.203 [/usr/local/share/dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.26 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 9.0.0-rc.2.24474.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.26 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 9.0.0-rc.2.24473.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

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

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

Regression?

No, from the source code, this may never worked before for Histogram custom tags.

Other information

It seems the issue is in MetricStore.cs => IsMeter method, and adding additional case for AggregatePercentilePayload seems to do the trick. Image

github-actions[bot] commented 1 day ago

Welcome to dotnet-monitor!

Thanks for creating your first issue; let us know what you think of dotnet-monitor by filling out our survey.