Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fix TestMetricsExport #2088

Merged
merged 1 commit into from
Apr 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions metrics/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func isNewExporterRequired(newConfig *metricsConfig) bool {
return newConfig.collectorAddress != cc.collectorAddress || newConfig.requireSecure != cc.requireSecure
}

if newConfig.backendDestination == prometheus {
return newConfig.prometheusHost != cc.prometheusHost || newConfig.prometheusPort != cc.prometheusPort
}

Copy link
Contributor Author

@skonto skonto Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering why we didn't have this here before? Probably it is because we dont allow so far to change the host and port, but it does not hurt anything here I guess since our observability cm does not expose it anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if all the effort to avoid reloading the config is too clever by half, but this seems like a good fix for now.

return newConfig.backendDestination == stackdriver && newConfig.stackdriverClientConfig != cc.stackdriverClientConfig
}

Expand Down