Description
Metric names should use dot-separated namespaces and snake_case to follow OpenTelemetry naming conventions.Bad Code
Good Code
Properties
- Category: Metrics
- Severity: Warning
- Enabled by default: True
- Code fix available: False
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use dot-separated namespaces and snake_case for metric names
var counter = meter.CreateCounter<long>("OrderCount");
var histogram = meter.CreateHistogram<double>("request-duration");
var counter = meter.CreateCounter<long>("myservice.order.count");
var histogram = meter.CreateHistogram<double>("http.server.request.duration");
dotnet_diagnostic.AL0068.severity = warning
Was this page helpful?
