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
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
What OS and version, and what distro if applicable?
MacOS 14.6.1 (23G93)
What is the architecture (x64, x86, ARM, ARM64)?
ARM64
Do you know whether it is specific to that configuration?
By looking at the source, I don't think it's specific to certain configurations.
Are you running in any particular type of environment? (e.g. Containers, a cloud scenario, app you are trying to target is a different user)
No
Is it a self-contained published application?
No
What's the output of dotnet info
`.NET SDK:
Version: 8.0.203
Commit: 5e1ceea679
Workload version: 8.0.200-manifests.205a5945
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.
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
dotnet info
`.NET SDK: Version: 8.0.203 Commit: 5e1ceea679 Workload version: 8.0.200-manifests.205a5945Runtime 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.