/// import { GrpcJsPlugin } from '../grpcJs'; import type { GrpcClientFunc } from '../types'; import { Span } from '@opentelemetry/api'; import type * as grpcJs from '@grpc/grpc-js'; import { EventEmitter } from 'events'; /** * Parse a package method list and return a list of methods to patch * with both possible casings e.g. "TestMethod" & "testMethod" */ export declare function getMethodsToWrap(this: GrpcJsPlugin, client: typeof grpcJs.Client, methods: { [key: string]: { originalName?: string; }; }): string[]; /** * Parse initial client call properties and start a span to trace its execution */ export declare function getPatchedClientMethods(this: GrpcJsPlugin): (original: GrpcClientFunc) => () => EventEmitter; /** * Execute grpc client call. Apply completitionspan properties and end the * span on callback or receiving an emitted event. */ export declare function makeGrpcClientRemoteCall(original: GrpcClientFunc, args: unknown[], metadata: grpcJs.Metadata, self: grpcJs.Client): (span: Span) => EventEmitter; /** * Inject opentelemetry trace context into `metadata` for use by another * grpc receiver * @param metadata */ export declare function setSpanContext(metadata: grpcJs.Metadata): void;