[]previous and next page

MetricsLike

The subset of the OpenTelemetry Metrics Meter that Dusk uses: pass metrics.getMeter("my-app") of @opentelemetry/api, or any object with the two methods.

The subset of the OpenTelemetry Metrics Meter that Dusk uses: pass metrics.getMeter("my-app") of @opentelemetry/api, or any object with the two methods.

Import#

ts
import type { MetricsLike } from "@shadow-js/dusk/server";

Signature#

ts
interface MetricsLike {
  createCounter(
    name: string,
    options?: { readonly description?: string; readonly unit?: string },
  ): CounterLike;
  createHistogram(
    name: string,
    options?: { readonly description?: string; readonly unit?: string },
  ): HistogramLike;
}

Members#

Name Type Description
createCounter createCounter( name: string, options?: { readonly description?: string; readonly unit?: string }, ): CounterLike
createHistogram createHistogram( name: string, options?: { readonly description?: string; readonly unit?: string }, ): HistogramLike