/**
 * Hand-rolled W3C Trace Context and Baggage propagation.
 *
 * The full propagators in `@opentelemetry/core` weigh ~27KB gzipped.
 * The W3C specs (https://www.w3.org/TR/trace-context/, https://www.w3.org/TR/baggage/)
 * are simple text formats; for the small subset we need (parse and
 * format `traceparent`, parse and format `baggage`), hand-rolling is
 * cheaper and avoids adding an OTEL dependency to @mastra/observability.
 */
export interface TraceparentParts {
    /** Version, currently always "00". */
    version: string;
    /** 32 hex chars. */
    traceId: string;
    /** 16 hex chars. Refers to the parent span this carrier identifies. */
    spanId: string;
    /** 2 hex chars. Bit 0 is the sampled flag. */
    flags: string;
}
export declare function parseTraceparent(value: string | undefined): TraceparentParts | null;
export declare function formatTraceparent(traceId: string, spanId: string, sampled: boolean): string;
/**
 * Parse a W3C Baggage header value into a Map.
 *
 * Format: `key=value,key2=value2;property=...`
 * Properties (after `;`) are ignored — we don't use them.
 * Values are percent-decoded per the spec.
 */
export declare function parseBaggage(value: string | undefined): Map<string, string>;
/**
 * Format a Map into a W3C Baggage header value.
 * Values are percent-encoded.
 */
export declare function formatBaggage(entries: Map<string, string> | Record<string, string>): string;
//# sourceMappingURL=w3c.d.ts.map