Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MetricRule

import type { MetricRule } from "https://googleapis.deno.dev/v1/serviceusage:v1.ts";

Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.

interface MetricRule {
metricCosts?: {
[key: string]: bigint;
}
;
selector?: string;
}

§Properties

§
metricCosts?: {
[key: string]: bigint;
}
[src]

Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.

§
selector?: string
[src]

Selects the methods to which this rule applies. Refer to selector for syntax details.