From 50a3209fff38d1decd1642d1175aec78b897d08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 26 Sep 2023 17:34:53 +0200 Subject: [PATCH] chore: deprecate Deno.metrics() API (#20684) This API is providing hoops to jump through with undergoing migration to `#[op2]` macro. The overhead of supporting this API is non-trivial and besides internal use of it in test sanitizers is very rarely used in the wild. --- cli/tsc/dts/lib.deno.ns.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 5f1177da80..2386cf10f5 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -3721,7 +3721,10 @@ declare namespace Deno { */ export function truncateSync(name: string, len?: number): void; - /** @category Observability */ + /** @category Observability + * + * @deprecated This API has been deprecated in Deno v1.37.1. + */ export interface OpMetrics { opsDispatched: number; opsDispatchedSync: number; @@ -3736,7 +3739,10 @@ declare namespace Deno { bytesReceived: number; } - /** @category Observability */ + /** @category Observability + * + * @deprecated This API has been deprecated in Deno v1.37.1. + */ export interface Metrics extends OpMetrics { ops: Record; } @@ -3765,6 +3771,8 @@ declare namespace Deno { * ``` * * @category Observability + * + * @deprecated This API has been deprecated in Deno v1.37.1. */ export function metrics(): Metrics;