import type { Attributes } from "@opentelemetry/api"; import type { TriggerTracerSpanEvent } from "../tracer.js"; import type { RunTimelineMetric, RunTimelineMetricsManager } from "./types.js"; export declare class RunTimelineMetricsAPI implements RunTimelineMetricsManager { #private; private static _instance?; private constructor(); static getInstance(): RunTimelineMetricsAPI; registerMetric(metric: RunTimelineMetric): void; getMetrics(): RunTimelineMetric[]; /** * Measures the execution time of an async function and registers it as a metric * @param metricName The name of the metric * @param eventName The event name * @param attributesOrCallback Optional attributes or the callback function * @param callbackFn The async function to measure (if attributes were provided) * @returns The result of the callback function */ measureMetric(metricName: string, eventName: string, attributesOrCallback: Attributes | (() => Promise), callbackFn?: () => Promise): Promise; convertMetricsToSpanEvents(): TriggerTracerSpanEvent[]; convertMetricsToSpanAttributes(): Attributes; setGlobalManager(manager: RunTimelineMetricsManager): boolean; }