/** * OTLP's protobuf encoding of a trace export, written by hand: an `ExportTraceServiceRequest` from * `opentelemetry/proto/collector/trace/v1`, and the partial success its response may carry. What * OTLP over gRPC sends, and OTLP/HTTP with `application/x-protobuf`. It runs anywhere: it needs * nothing but `TextEncoder`. */ import type { OtlpExportRequest } from './otlp.js'; /** * An export request in OTLP's protobuf encoding, as a collector takes it over gRPC or OTLP/HTTP with * `content-type: application/x-protobuf`. */ export declare function encodeOtlpTraceRequest(request: OtlpExportRequest): Uint8Array; /** What a collector says it rejected of an export it otherwise took, from OTLP's partial success. */ export interface OtlpPartialSuccess { /** Spans it rejected. */ rejectedSpans: number; /** Why, in its words. */ errorMessage?: string; } /** * Reads an `ExportTraceServiceResponse` in the protobuf encoding: its partial success, or nothing * when the collector took every span. */ export declare function decodeOtlpTraceResponse(bytes: Uint8Array): OtlpPartialSuccess | undefined;