import { Interceptor } from '@connectrpc/connect'; import { d as OtelInterceptorOptions } from './types-Db5ZtQHb.js'; /** * ConnectRPC OpenTelemetry interceptor * * Creates a ConnectRPC interceptor that instruments RPC calls with * OpenTelemetry tracing and metrics following semantic conventions. * * @see https://opentelemetry.io/docs/specs/semconv/rpc/connect-rpc/ * @see https://opentelemetry.io/docs/specs/semconv/rpc/rpc-metrics/ * @module interceptor */ /** * Creates a ConnectRPC interceptor that instruments RPC calls with * OpenTelemetry tracing and/or metrics. * * The interceptor follows OpenTelemetry semantic conventions for RPC: * - Creates server spans with standard RPC attributes * - Records call duration, request size, and response size metrics * - Supports context propagation with configurable trust mode * - Handles both unary and streaming calls * * @param options - Configuration options for the interceptor * @returns A ConnectRPC Interceptor function * * @example * ```typescript * import { createOtelInterceptor } from '@connectum/otel'; * import { createServer } from '@connectum/core'; * * const server = createServer({ * services: [routes], * interceptors: [createOtelInterceptor({ * serverPort: 5000, * filter: ({ service }) => !service.includes("Health"), * })], * }); * ``` */ declare function createOtelInterceptor(options?: OtelInterceptorOptions): Interceptor; export { createOtelInterceptor };