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

[exporter/prometheusremotewriteexporter] fix config key collision: un-squash client config (issue 37332) #37588

Conversation

vigr
Copy link

@vigr vigr commented Jan 30, 2025

Description

Prometheus remote write HTTP client config is squashed into the exporter config hence causing a collision for timeout key.
This PR fixes the issue (#37332) by putting the HTTP config under its own key prw_client (unsquashed) in a backward-compatible manner.

Link to tracking issue

Fixes #37332

Testing

New test:

  • Test_NewPRWExporter_ClientConfig

Additional case for test:

  • TestLoadConfig

Documentation

My intention is to put the HTTP client config under its own key prw_client such that:

  • it's backward-compatible: prior configs will continue working
  • if new prw_client config section is specified, it takes precedence over the squashed version
  • default options for the prw_client are preserved in a single place: see setDefaultsPRWClientConfig function
  • the squashed version (Config.ClientConfig) is deprecated in favor of the new format

Copy link

CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeout config key collision
1 participant