PromPHP / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
423 stars 93 forks source link

Implement URL/DSN parsing for redis connection string (or incorporate predis/predis bundle to handle redis connection) #79

Open pmcgoverncw opened 2 years ago

pmcgoverncw commented 2 years ago

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

pmcgoverncw commented 2 years ago

Another example is the snc/sncredisbundle dns parser: https://github.com/snc/SncRedisBundle/blob/master/DependencyInjection/Configuration/RedisDsn.php#L169

LKaemmerling commented 2 years ago

Hey @pmcgoverncw,

good idea! If you want (and have time) feel free to submit a MR :)