fix: Fix kafka exporter instance argument#5213
fix: Fix kafka exporter instance argument#5213nilforoosh wants to merge 1 commit intografana:mainfrom
Conversation
|
|
| // their own value for instance key in the common config. | ||
| func (c *Config) InstanceKey(_ string) (string, error) { | ||
| if len(c.KafkaURIs) == 1 { | ||
| if c.Instance == "" && len(c.KafkaURIs) == 1 { |
There was a problem hiding this comment.
To make this a bit more readable, should we refactor to have a guard clause checking if Instance is set, and otherwise check the KafkaURIs?
if c.Instance != "" {
return c.Instance, nil
}
//check KafkaURIs here
|
This PR has not had any activity in the past 90 days, so the |
Brief description of Pull Request
When there is only one URI in kafka-exporter, the instance parameter is ignored and there is a bug.
Pull Request Details
Issue(s) fixed by this Pull Request
Notes to the Reviewer
PR Checklist