Skip to content

Commit

Permalink
chore: deprecate Deno.metrics() API (denoland#20684)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bartlomieju authored Sep 26, 2023
1 parent 3c0d6de commit 50a3209
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<string, OpMetrics>;
}
Expand Down Expand Up @@ -3765,6 +3771,8 @@ declare namespace Deno {
* ```
*
* @category Observability
*
* @deprecated This API has been deprecated in Deno v1.37.1.
*/
export function metrics(): Metrics;

Expand Down

0 comments on commit 50a3209

Please sign in to comment.