import { Middleware, MiddlewareContext, MiddlewareName, MiddlewareNext } from './types.js';
import { TransportResult } from '../types.js';
/** Endpoints whose body can be captured as `db.query.text`. */
export declare const SEARCH_LIKE_ENDPOINTS: ReadonlySet<string>;
/** Endpoints whose body is an ES|QL/SQL string query (captured only when parameterized). */
export declare const STRING_QUERY_ENDPOINTS: ReadonlySet<string>;
/** Endpoints whose body is NDJSON (header + query line pairs). */
export declare const NDJSON_ENDPOINTS: ReadonlySet<string>;
/** Max length of the `db.query.text` attribute, in characters. */
export declare const SEARCH_QUERY_MAX_LENGTH = 2048;
export interface OpenTelemetryOptions {
    enabled?: boolean;
    /**
     * Suppresses tracing for the request: the Elasticsearch span is non-recording
     * and, because the suppressed context is active during the HTTP call, lower-level
     * HTTP (e.g. undici) instrumentation is suppressed too.
     */
    suppressInternalInstrumentation?: boolean;
    /**
     * Records sanitized request bodies as `db.query.text`. Off by default: even
     * sanitized, query structure can reveal schema or search patterns, so enable only
     * where tracing data is access-controlled.
     */
    captureSearchQuery?: boolean;
}
export declare class OpenTelemetryMiddleware implements Middleware {
    readonly name = MiddlewareName.OPEN_TELEMETRY;
    readonly priority: number;
    private readonly tracer;
    private readonly transportOptions;
    private readonly serializer;
    constructor(transportOptions: OpenTelemetryOptions);
    around: (ctx: MiddlewareContext, next: MiddlewareNext) => Promise<TransportResult>;
    private setResponseAttributes;
    private buildAttributes;
    private captureQueryText;
}
//# sourceMappingURL=OpenTelemetry.d.ts.map