UNPKG

@cran/gql.koa

Version:

Cran/GraphQL Koa Server

37 lines (36 loc) 1.55 kB
import type { ExportResult } from "@opentelemetry/core"; import type { SpanAttributes } from "@opentelemetry/api"; import type { ReadableSpan, SpanExporter } from "@opentelemetry/sdk-trace-base"; export declare namespace MetricSpanExporter { type ExportCallback = (result: ExportResult) => void; interface RelabelConfig { library: string; name: string; } type Relabel = (attributes: SpanAttributes, config: RelabelConfig) => Record<string, string> | null; interface Config { prefix: string; relabel: Record<string, Relabel>; trace(value: object): void; } } export declare class MetricSpanExporter implements SpanExporter { private readonly metrics; private readonly config; constructor(config: Partial<MetricSpanExporter.Config>); export(spans: Array<ReadableSpan>, done: MetricSpanExporter.ExportCallback): undefined; shutdown(): Promise<void>; private format; private send; private metric; private newMetric; } export declare namespace MetricSpanExporter { const ttyPrint: (<T>(value: T) => T) | { (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string; (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string; }; function defaultTracer(value: unknown): void; function relabelAll(attributes: SpanAttributes): Record<string, string>; const defaultRelabel: Record<string, Relabel>; }