Skip to main content

Type Alias: MetricName

@arolariu/website


@arolariu/website / instrumentation.server / MetricName

Type Alias: MetricName

MetricName = `http.server.${string}` | `http.client.${string}` | `db.${string}` | `cache.${string}` | `api.${string}` | `user.${string}` | `page.${string}` | `component.${string}` | `business.${string}` | `website.${string}`

Defined in: instrumentation.server.ts:124

Metric name types for type-safe metric creation.

Remarks

Follow OpenTelemetry semantic conventions:

  • Use dots for namespacing (e.g., http.server.requests)
  • Include units in the name (e.g., .duration, .size.bytes)
  • Use plural for counters (e.g., requests, errors)
// was this page useful?