This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.57k
stars
4.82k
forks
source link
Azure Monitor OTel Exporter does not support array attributes on metrics #47262
Mapping OpenTelemetry Attributes to properties: If attribute value is of primitive type array, then the property value should be a comma-separated array elements.
Try
Array attribute on spans works fine, but is converted to string with
ToString()
on metrics here https://github.com/Azure/azure-sdk-for-net/blob/e1e91d2dd8fb2c854b75f46a9a294116942d2418/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Customizations/Models/MetricsData.cs#L34The suggestion is to do it consistently (comma separated list).
context: https://github.com/open-telemetry/semantic-conventions/pull/1525 use-case: as a user I might want to filter my metrics checking if array attribute contains a specific value among others.