import * as grpc from '@grpc/grpc-js'; import type { ObservableRequestHandler } from '../observabilityhandler'; /** * The gateway's address, as each attempt's span reports it. * * @internal */ export interface GatewayAddress { /** * The host, an IPv6 literal without its brackets. */ host: string; /** * The port. */ port: number; } /** * The full name of the RPC a call makes, `/`, as the * gateway names its own span for the call. * * @internal */ export declare function rpcName(path: string): string; /** * The interceptor that traces each attempt of a request under its * operation's span, or undefined when the operation's span is not recording. * * Each attempt is one gRPC call, with a span named for the RPC. Under the * OpenTelemetry tracer the call carries the span's trace context, so the * gateway's span is its child. The span ends with the call's status (for a * stream, when the stream ends) and is marked failed on any status but * `OK`, unless the SDK canceled the call itself. * * @internal */ export declare function attemptInterceptor(obs: ObservableRequestHandler | null | undefined, address: GatewayAddress): grpc.Interceptor | undefined;