prometheus_client_php
prometheus_client_php copied to clipboard
Implement URL/DSN parsing for redis connection string (or incorporate predis/predis bundle to handle redis connection)
Currently there is no way to use a URL/DSN to define redis connection parameters, which is problematic in applications that use bundles such as predis or SNC Redis, which allow redis connection parameter definition via a dsn.
This request is to implement an option to define redis connection parameters as either separate values (as it is now in this bundle) OR as a single DSN.
Example of URL parsing used by predis/predis: https://github.com/predis/predis/blob/main/src/Connection/Parameters.php#L69
Another example is the snc/sncredisbundle dns parser: https://github.com/snc/SncRedisBundle/blob/master/DependencyInjection/Configuration/RedisDsn.php#L169
Hey @pmcgoverncw,
good idea! If you want (and have time) feel free to submit a MR :)