Microsoft.Gen.Metrics doesn't allow int-typed tag (error METGEN012)
Open
area-telemetry
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 894
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
In the `Microsoft.Extensions.Telemetry.Abstractions` package, the metrics source generator `Microsoft.Gen.Metrics` allows `string` and `enum` types for tag values, and emits error METGEN012 otherwise:
OpenTelemetry semantic conventions define `int`-typed attributes for some metrics, in particular the `server.port` attribute in [messaging.client.operation.duration](https://opentelemetry.io/docs/specs/semconv/messaging/messaging-metrics/#metric-messagingclientoperationduration) and in [RPC metrics](https://opentelemetry.io/docs/specs/semconv/rpc/rpc-metrics/#attributes). I think Microsoft.Gen.Metrics should allow `int`, too.
Contributor guide
Assessment
This issue has not been assessed yet.