diff options
Diffstat (limited to 'cli/tsc/dts')
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 973a09d92..6234268c3 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -1225,6 +1225,108 @@ declare namespace Deno { export {}; // only export exports } + /** + * @category Telemetry + * @experimental + */ + export namespace tracing { + /** + * Whether tracing is enabled. + * @category Telemetry + * @experimental + */ + export const enabled: boolean; + + /** + * Allowed attribute type. + * @category Telemetry + * @experimental + */ + export type AttributeValue = string | number | boolean | bigint; + + /** + * A tracing span. + * @category Telemetry + * @experimental + */ + export class Span implements Disposable { + readonly traceId: string; + readonly spanId: string; + readonly parentSpanId: string; + readonly kind: string; + readonly name: string; + readonly startTime: number; + readonly endTime: number; + readonly status: null | { code: 1 } | { code: 2; message: string }; + readonly attributes: Record<string, AttributeValue>; + readonly traceFlags: number; + + /** + * Construct a new Span and enter it as the "current" span. + */ + constructor( + name: string, + kind?: "internal" | "server" | "client" | "producer" | "consumer", + ); + + /** + * Set an attribute on this span. + */ + setAttribute( + name: string, + value: AttributeValue, + ): void; + + /** + * Enter this span as the "current" span. + */ + enter(): void; + + /** + * Exit this span as the "current" span and restore the previous one. + */ + exit(): void; + + /** + * End this span, and exit it as the "current" span. + */ + end(): void; + + [Symbol.dispose](): void; + + /** + * Get the "current" span, if one exists. + */ + static current(): Span | undefined | null; + } + + /** + * A SpanExporter compatible with OpenTelemetry.js + * https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk_trace_base.SpanExporter.html + * @category Telemetry + * @experimental + */ + export class SpanExporter {} + + /** + * A ContextManager compatible with OpenTelemetry.js + * https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.ContextManager.html + * @category Telemetry + * @experimental + */ + export class ContextManager {} + + export {}; // only export exports + } + + /** + * @category Telemetry + * @experimental + */ + export namespace metrics { + export {}; // only export exports + } + export {}; // only export exports } |