Skip to content

Commit

Permalink
Add more logs to debug the output of Sarama DescribeTopics method (k…
Browse files Browse the repository at this point in the history
…edacore#5141)

Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: anton.lysina <alysina@gmail.com>
  • Loading branch information
dttung2905 authored and toniiiik committed Jan 15, 2024
1 parent 86aea30 commit 4a47c1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Here is an overview of all new **experimental** features:
- **General**: Support TriggerAuthentication properties from ConfigMap ([#4830](https://github.com/kedacore/keda/issues/4830))
- **Hashicorp Vault**: Add support to get secret that needs write operation (e.g. pki) ([#5067](https://github.com/kedacore/keda/issues/5067))
- **Kafka Scaler**: Ability to set upper bound to the number of partitions with lag ([#3997](https://github.com/kedacore/keda/issues/3997))
- **Kafka Scaler**: Add more logging to check Sarama DescribeTopics method ([#5102](https://github.com/kedacore/keda/issues/5102))
- **Kafka Scaler**: Add support for Kerberos authentication (SASL / GSSAPI) ([#4836](https://github.com/kedacore/keda/issues/4836))
- **Prometheus Metrics**: Introduce paused ScaledObjects in Prometheus metrics ([#4430](https://github.com/kedacore/keda/issues/4430))
- **Pulsar Scaler**: support endpointParams in pulsar oauth ([#5069](https://github.com/kedacore/keda/issues/5069))
Expand Down
2 changes: 1 addition & 1 deletion pkg/scalers/apache_kafka_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func (s *apacheKafkaScaler) getTopicPartitions(ctx context.Context) (map[string]
if err != nil {
return nil, fmt.Errorf("error getting metadata: %w", err)
}
s.logger.V(4).Info(fmt.Sprintf("Listed topics %v", metadata.Topics))
s.logger.V(1).Info(fmt.Sprintf("Listed topics %v", metadata.Topics))

if len(s.metadata.topic) == 0 {
// in case of empty topic name, we will get all topics that the consumer group is subscribed to
Expand Down
3 changes: 3 additions & 0 deletions pkg/scalers/kafka_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,9 @@ func (s *kafkaScaler) getTopicPartitions() (map[string][]int32, error) {
if err != nil {
return nil, fmt.Errorf("error describing topics: %w", err)
}
s.logger.V(1).Info(
fmt.Sprintf("with topic name %s the list of topic metadata is %v", topicsToDescribe, topicsMetadata),
)

if s.metadata.topic != "" && len(topicsMetadata) != 1 {
return nil, fmt.Errorf("expected only 1 topic metadata, got %d", len(topicsMetadata))
Expand Down

0 comments on commit 4a47c1a

Please sign in to comment.