From c7fd5508013b7e6976ca7ceb04dd552ea07a48ea Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Tue, 23 Apr 2024 23:04:38 +0300 Subject: [PATCH] use generic messageinfo type --- plugins/node/instrumentation-kafkajs/src/types.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/node/instrumentation-kafkajs/src/types.ts b/plugins/node/instrumentation-kafkajs/src/types.ts index f0be80bc3c..8cd9a64e03 100644 --- a/plugins/node/instrumentation-kafkajs/src/types.ts +++ b/plugins/node/instrumentation-kafkajs/src/types.ts @@ -24,17 +24,17 @@ export interface KafkajsMessage { timestamp?: string; } -export interface MessageInfo { +export interface MessageInfo { topic: string; - message: KafkajsMessage; + message: T; } -export interface KafkaProducerCustomAttributeFunction { - (span: Span, info: MessageInfo): void; +export interface KafkaProducerCustomAttributeFunction { + (span: Span, info: MessageInfo): void; } -export interface KafkaConsumerCustomAttributeFunction { - (span: Span, info: MessageInfo): void; +export interface KafkaConsumerCustomAttributeFunction { + (span: Span, info: MessageInfo): void; } export interface KafkaJsInstrumentationConfig extends InstrumentationConfig {