Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ancplua.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Source: Al0068InvalidMetricNameAnalyzer.cs

Description

Metric names should use dot-separated namespaces and snake_case to follow OpenTelemetry naming conventions.

Bad Code

var counter = meter.CreateCounter<long>("OrderCount");
var histogram = meter.CreateHistogram<double>("request-duration");

Good Code

var counter = meter.CreateCounter<long>("myservice.order.count");
var histogram = meter.CreateHistogram<double>("http.server.request.duration");

Properties

  • Category: Metrics
  • Severity: Warning
  • Enabled by default: True
  • Code fix available: False

Configuration

dotnet_diagnostic.AL0068.severity = warning