/** * MetricsBatch — ergonomic, immutable wrapper over OtlpMetricsDocument. * * Flattens the nested OTLP structure into MetricPoint tuples and provides * chainable filter/group/merge operations. Round-trips cleanly to OTLP JSON. */ import type { OtlpMetricsDocument } from "./types.js"; import type { Direction, MetricRole } from "./otlp-conventions.js"; export interface MetricPoint { readonly scenario: string; readonly series: string; readonly metric: string; readonly value: number; readonly unit: string; readonly direction: Direction | undefined; readonly role: MetricRole | undefined; readonly tags: Readonly>; readonly timestamp: string | undefined; } export interface ResourceContext { readonly runId: string | undefined; readonly kind: string | undefined; readonly sourceFormat: string | undefined; readonly commit: string | undefined; readonly ref: string | undefined; readonly workflow: string | undefined; readonly job: string | undefined; readonly runAttempt: string | undefined; readonly runner: string | undefined; readonly serviceName: string | undefined; } export declare class MetricsBatch { readonly context: ResourceContext; readonly points: readonly MetricPoint[]; private constructor(); static fromOtlp(doc: OtlpMetricsDocument): MetricsBatch; static fromPoints(points: MetricPoint[], context?: ResourceContext): MetricsBatch; static merge(...batches: MetricsBatch[]): MetricsBatch; get size(): number; get scenarios(): string[]; get metricNames(): string[]; filter(fn: (p: MetricPoint) => boolean): MetricsBatch; forScenario(name: string): MetricsBatch; forMetric(name: string): MetricsBatch; withoutMonitor(): MetricsBatch; onlyMonitor(): MetricsBatch; groupBy(fn: (p: MetricPoint) => string): Map; groupByScenario(): Map; groupByMetric(): Map; groupBySeries(): Map; toOtlp(): OtlpMetricsDocument; toJson(): string; } export declare function seriesKey(p: MetricPoint): string; //# sourceMappingURL=metrics-batch.d.ts.map