Skip to content

Update multi-target handler to use new DSN type #684

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

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

sysadmind
Copy link
Contributor

  • Moves new dsn type to config.DSN. This will prevent circular dependencies.
  • Change DSN.query to be url.Values. This allows the multi-target functionality to merge values without re-parsing the query string
  • Change NewProbeCollector to use the new config.DSN type
  • Add DSN.GetConnectionString to return a string formatted for the sql driver to use during connection

Signed-off-by: Joe Adams github@joeadams.io

- Moves new dsn type to config.DSN. This will prevent circular dependencies.
- Change DSN.query to be url.Values. This allows the multi-target functionality to merge values without re-parsing the query string
- Change NewProbeCollector to use the new config.DSN type
- Add DSN.GetConnectionString to return a string formatted for the sql driver to use during connection

Signed-off-by: Joe Adams <github@joeadams.io>
Signed-off-by: Joe Adams <github@joeadams.io>
@sysadmind sysadmind merged commit cb70292 into prometheus-community:master Sep 2, 2022
@sysadmind sysadmind deleted the probe-dsn branch November 1, 2022 00:32
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.

2 participants