dotnet / extensions

This repository contains a suite of libraries that provide facilities commonly needed when creating production-ready applications.
MIT License
2.65k stars 753 forks source link

dotnet/extensions metric names to follow some convention #4432

Closed klauco closed 1 year ago

klauco commented 1 year ago

Currently, the metric names are using backslashes. OTel uses dots. We need to go through the metrics and ensure we stick to the same naming convention (and semantic grouping as part of the metric name).

Proposal:

  1. use dots instead of backslashes
  2. follow pluralization rules as described in https://opentelemetry.io/docs/specs/otel/metrics/semantic_conventions/
klauco commented 1 year ago

cc @geeknoid @xakep139 @noahfalk

xakep139 commented 1 year ago

As @noahfalk suggested, we should consider using instrument names that follow pattern like: aspnetcore.header_parsing.parse_errors instead of HeaderParsing.ParsingErrors that we have currently.

xakep139 commented 1 year ago

I can apply this pattern within #4342, but we need to reach an agreement first

martintmk commented 1 year ago

As @noahfalk suggested, we should consider using instrument names that follow pattern like: aspnetcore.header_parsing.parse_errors instead of HeaderParsing.ParsingErrors that we have currently.

We have also aligned the naming in Polly with OpenTelemetry by using the convention as suggested above. See https://github.com/App-vNext/Polly/pull/1583 for reference.

Also attributes names were changed:

xakep139 commented 1 year ago

Up-to-date conventions are here: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metrics.md

joperezr commented 1 year ago

@xakep139 is working on this this week, and the target is to merge by next week.

joperezr commented 1 year ago

Update: