///
import { Span } from "@opentelemetry/api";
import { InstrumentationConfig } from "@opentelemetry/instrumentation";
//#region src/types.d.ts
export interface KafkajsMessage {
key?: Buffer | string | null;
value: Buffer | string | null;
partition?: number;
headers?: Record;
timestamp?: string;
}
export interface MessageInfo {
topic: string;
message: T;
}
export interface KafkaProducerCustomAttributeFunction {
(span: Span, info: MessageInfo): void;
}
export interface KafkaConsumerCustomAttributeFunction {
(span: Span, info: MessageInfo): void;
}
export interface KafkaJsInstrumentationConfig extends InstrumentationConfig {
/** hook for adding custom attributes before producer message is sent */
producerHook?: KafkaProducerCustomAttributeFunction;
/** hook for adding custom attributes before consumer message is processed */
consumerHook?: KafkaConsumerCustomAttributeFunction;
}
//#endregion
//# sourceMappingURL=types.d.mts.map