import { Context, TextMapGetter, TextMapSetter, TextMapPropagator } from '@opentelemetry/api'; /** The metadata key under which span context is stored as a binary value. */ export declare const GRPC_TRACE_KEY = "grpc-trace-bin"; /** * Propagator for the grpc-trace-bin header used by OpenCensus for * gRPC. Acts as a bridge between the TextMapPropagator interface and * the binary encoding/decoding that happens in the supporting * BinaryTraceContext class. */ export declare class GrpcCensusPropagator implements TextMapPropagator { /** * Injects trace propagation context into the carrier after encoding * in binary format * * @param context - Context to be injected * @param carrier - Carrier in which to inject (for gRPC this will * be a grpc.Metadata object) * @param setter - setter function that sets the correct key in * the carrier */ inject(context: Context, carrier: unknown, setter: TextMapSetter): void; /** * Extracts trace propagation context from the carrier and decodes * from the binary format * * @param context - context to set extracted span context on * @param carrier - Carrier from which to extract (for gRPC this will * be a grpc.Metadata object) * @param getter - getter function that gets value(s) for the correct * key in the carrier * @returns Extracted context if successful, otherwise the input context */ extract(context: Context, carrier: unknown, getter: TextMapGetter): Context; fields(): string[]; }