/// import type { IncomingMessage, ServerResponse } from "node:http"; import { SpanOptions, Span } from "@opentelemetry/api"; import { Counter, Histogram, MetricOptions, UpDownCounter } from "@opentelemetry/api-metrics"; import * as IO from "fp-ts/lib/IO"; import * as TE from "fp-ts/lib/TaskEither"; import type { Config } from "../../config"; export interface Telemetry { readonly getMetricsRequestHandler: (_request: IncomingMessage, response: ServerResponse) => IO.IO; readonly withSpan: (name: string, options: SpanOptions | undefined) => (callback: TE.TaskEither) => TE.TaskEither; readonly startSpan: (name: string, options: SpanOptions) => IO.IO; readonly shutdown: () => TE.TaskEither; readonly createHistogram: (name: string, options: MetricOptions) => IO.IO; readonly createCounter: (name: string, options: MetricOptions) => IO.IO; readonly createUpDownCounter: (name: string, options: MetricOptions) => IO.IO; } export declare function createTelemetry({ config, }: { readonly config: Config; }): TE.TaskEither;