From bd5ab886b6970d762044bb805ce9485d7e489648 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Tue, 22 Oct 2024 12:55:52 -0700 Subject: [PATCH] Adding topic name to log fields (#975) --- processes/consumer/kafka.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processes/consumer/kafka.go b/processes/consumer/kafka.go index df20cb8e7..55cee2dc3 100644 --- a/processes/consumer/kafka.go +++ b/processes/consumer/kafka.go @@ -105,7 +105,7 @@ func StartConsumer(ctx context.Context, cfg config.Config, inMemDB *models.Datab tableName, processErr := args.process(ctx, cfg, inMemDB, dest, metricsClient) if processErr != nil { - logger.Fatal("Failed to process message", slog.Any("err", processErr)) + logger.Fatal("Failed to process message", slog.Any("err", processErr), slog.String("topic", kafkaMsg.Topic)) } msg.EmitIngestionLag(metricsClient, cfg.Mode, kafkaConsumer.Config().GroupID, tableName)